Received: by 10.213.65.68 with SMTP id h4csp1728642imn; Mon, 19 Mar 2018 11:36:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELs7pw45vH8VpM6nDmbFSk9/ugF/GAWtQxECy16QXn6z09hqQafuzz5Fw2ot71Cz3fqggkcC X-Received: by 10.98.161.10 with SMTP id b10mr10971622pff.240.1521484609673; Mon, 19 Mar 2018 11:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521484609; cv=none; d=google.com; s=arc-20160816; b=mrII5f4HragpkNbUswSqkm+mKDnDsEdXXwjLUqSPtefJWQ3a+Ua/szWCIPjSKP9Bz1 Z589QFd83E4PJCf6MEwbkk3/hObYoPtFMwr5Hrxhn3afelmr4SxIaGokR5CHJyOe4dxJ ofrLo3ElgKvlNLUTiT9IoM0Q65u8X1Os/rMWq9r8dUDJqvOAVgiHAZOCMGLlDD4QUJMH k3o3WpYaI+XAZzgYvuDUyGEuuK8ABbopzAIBCb16nzNx8FkRZ8ki5QfbWPuiDMFtx0hz jJQ3Ky7In7LL4oQom5+OMu4tKU8yG+vce4CKXWH53gaPg8E3gMmaVzdfot7/BiGrNauW ARHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=TpUEAS1TDI6xpcnd0edlwZ5YhoQ1X3Np0X766yAJbu0=; b=Oh1VEh9Jh4xCjAzohASRLcDkjNLd/nkDlTc+Ya4/kWLw+AKz8C1fde+B2UC15R0QKg MCckrAfNSLTXmOimLhA0K8gTh7qivOQCZSuTLeq54rl5eKQ1Nwz2J6FTBaIZJO09p43f mndyPq76sHsfPR+esu/XVrZ6OZuIKIaogSt8WT+b6XgpMepq3emB2RlRvA5MjHCbQwFc KuuJNyrbDoQf/Zwf9GoP9mB8dgGeGr4l7PYN9RHTSD131yrZ5lWUTfZ/bM9aW/F0N34a Mbg9dLr4VM5ImWDKlMWzieX4FFJ0bz8+iy42bwllfJU5LZgXpdqeBc47d10SavNEM9J4 +KUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8-v6si427434pln.420.2018.03.19.11.36.35; Mon, 19 Mar 2018 11:36:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032174AbeCSSdJ (ORCPT + 99 others); Mon, 19 Mar 2018 14:33:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54146 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032160AbeCSSdE (ORCPT ); Mon, 19 Mar 2018 14:33:04 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0363B12A1; Mon, 19 Mar 2018 18:33:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Cooper , Florian Fainelli , Kishon Vijay Abraham I Subject: [PATCH 4.15 51/52] phy: phy-brcm-usb-init: DRD mode can cause crash on startup Date: Mon, 19 Mar 2018 19:08:49 +0100 Message-Id: <20180319180737.751421102@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180734.976730813@linuxfoundation.org> References: <20180319180734.976730813@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Al Cooper commit 0aa0c12262fd848c48448c39ff6c1c097be00dd4 upstream. This is caused by a bug in the BDC core. When the BDC core comes out of reset and it's not selected, it gets a backup clock. When the BDC core is selected, it get's the main clock. If HOST mode is then selected the BDC core has the main clock shut off but the backup clock is not restored. The failure scenario and cause are as follows: - DRD mode is active - Device mode is selected first in bootloader - When host mode is now selected, the clock to the BDC is cut off. - BDC registers are inaccessible and therefore the BDC driver crashes upon Linux boot. The fix is to have the phy driver always force a BDC reset on startup. Fixes: 49859e55e364 ("phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver") Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Greg Kroah-Hartman --- drivers/phy/broadcom/phy-brcm-usb-init.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/phy/broadcom/phy-brcm-usb-init.c +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c @@ -917,6 +917,7 @@ void brcm_usb_init_common(struct brcm_us USB_CTRL_UNSET_FAMILY(params, USB_PM, BDC_SOFT_RESETB); break; default: + USB_CTRL_UNSET_FAMILY(params, USB_PM, BDC_SOFT_RESETB); USB_CTRL_SET_FAMILY(params, USB_PM, BDC_SOFT_RESETB); break; }