Received: by 10.213.65.68 with SMTP id h4csp1862218imn; Mon, 19 Mar 2018 15:33:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELsJXoO0HGUJzrcWcZYlhZiREmfijRK3P1wkLkG6hpE2U3f/sQaAnMIrxRCMa8xFhHMeqg3A X-Received: by 10.98.198.146 with SMTP id x18mr11602702pfk.22.1521498837577; Mon, 19 Mar 2018 15:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498837; cv=none; d=google.com; s=arc-20160816; b=mNIVD3Ek3WWsWGsGVL2cxzNVd8k4zrOiz7EAQfqVJMf/H1HuV0hkZQJ8TuwPm0Bq6g Vo5oXl7bv0lmdcWJkxulWBmEJGkwdQ7LuDSyfLiahsiNi/S9cEBbfh5ea00HdCRZqCDZ wa5z8RH+s038BBkE3sQFKGNdjS9fHZii69bsSGvNEIh3XtSlqwaW7v1bV9eVGkkFSdBn PstlbkWmLpZll44hxeBGymhSe84/YLim8LsrI0VRywmx1dJMF1+Fw/1jbhjN8ex8IzqQ Lw42cTWFlw1NRCEd8OBUJY7WBimds/BbT5QMllJyMLvycEmQAX4/sOUqTV/u2kgtsG15 o3EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wJg7osykXt8sUfo3KLXzmuWZN1ocujbo1uFvsmjxeG8=; b=nW7VIC7hgcic0QhUY6sfUGwB0Fv6azP5vJRgq9sJsGrl8a8uIqABq0My19GSsSr5/J w0V+i/XuHp+7H3LbBa5ASy34WdlRcusnpygkgwblrKy3ksSaCzzwH2jTh7jTpvQf0iaj 1hbwGbDJ+Gh7rteJpupnCoEkCXE2D+Cow0WQySaqleRZieRS/Iq5JHHGT6YDokFzAC3Y hy/yTCL1kez25EFN6X61+7LcLL3a+b2rIL4AlbUgAhaGU6qS3x6Ul6+CfyjeWRE6n3xN 7Yt6iNopTMmtLCgxHeVxh+WQ2h1101zP1r9TQoeDW1IGNJxIBOPwc05yF7oKsTHtHh7p +Vxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=dUwgeDa+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si162203pgb.365.2018.03.19.15.33.42; Mon, 19 Mar 2018 15:33:57 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=dUwgeDa+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933711AbeCSPsD (ORCPT + 99 others); Mon, 19 Mar 2018 11:48:03 -0400 Received: from mail-cys01nam02on0090.outbound.protection.outlook.com ([104.47.37.90]:61852 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933449AbeCSPrd (ORCPT ); Mon, 19 Mar 2018 11:47:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wJg7osykXt8sUfo3KLXzmuWZN1ocujbo1uFvsmjxeG8=; b=dUwgeDa+vi9n1jOmB/bWokFeHqNhOfKfJ+8jrEE/ZKxM12R0/u0ZyydQgAhzs8AOqQhb3hAyhr4QJIj5yshaHEkLQEVQZWc0FlTcEsU7ADOSg+mLn858RkqHIlwUmdII1hhpKDjmZNVex+zSxBfCXqbDA9NZpWppWrdefmFRq3I= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0998.namprd21.prod.outlook.com (52.132.133.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.0; Mon, 19 Mar 2018 15:47:28 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:47:28 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Al Cooper , Al Cooper , Kishon Vijay Abraham I , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 024/124] phy: phy-brcm-usb-init: DRD mode can cause crash on startup Thread-Topic: [PATCH AUTOSEL for 4.15 024/124] phy: phy-brcm-usb-init: DRD mode can cause crash on startup Thread-Index: AQHTv5mS86eRPuMt2UisdWdJfqS3aQ== Date: Mon, 19 Mar 2018 15:47:23 +0000 Message-ID: <20180319154645.11350-24-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0998;7:QelKr0+fZ6mAox0Q30HvvFN58Cr+CkgbmNRKmeNo8p/ApmRjHruKHej2BylFgvwDZhPeXCall5NN41e/EDv1YqI/IJNpjXrbuFsK8TTNqdzck6+E4iRkr6EGjnhyrT/96F9Ijgu9nLZS/PU5JRrF3TJ7QErp+YND17u0dXIMyZc9qokH2mGvSsMmIRvkhV8jVZvk/D+LQV4LhPA0hNxGNUAOg/6+IoLElk77dhPjOY4ihVjniiFiLpISH5fHDOuQ;20:JZtsI1YpzOG+btChAVMt5po7dKJXcmbsdEoQs/4v1A24NPMlJqQQMNaKw6aIZnnlVPlKF8szct0hU5PiKvID2EXkiW+Q6aWsx+x3i82FMrPd15hc979H7is1LWbHKOYKITQwl6WI1KSVxsucelMY8phT7P3uEMavcBiKUp2Djv0= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b4f38203-0991-4f16-60ce-08d58db0b7d8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0998; x-ms-traffictypediagnostic: DM5PR2101MB0998: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0998;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0998; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(366004)(376002)(396003)(346002)(199004)(189003)(3846002)(6116002)(8936002)(6486002)(102836004)(68736007)(6506007)(2900100001)(22452003)(25786009)(3660700001)(7736002)(76176011)(6512007)(72206003)(86362001)(575784001)(53936002)(8676002)(81156014)(6436002)(81166006)(305945005)(478600001)(99286004)(2950100002)(14454004)(6666003)(10290500003)(186003)(107886003)(2501003)(106356001)(26005)(86612001)(97736004)(5660300001)(10090500001)(110136005)(54906003)(316002)(2906002)(66066001)(105586002)(4326008)(36756003)(39060400002)(3280700002)(1076002)(5250100002)(59450400001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0998;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 3cC/hVifQRSDpYwFdKva4oXqHvQ1bpGgDmqKu+eUCpoD0YilOFA3tO29fp+pPb/F7Irkd++2XuTsdOwpVGkQ7CsNvuyROauHHtDWDL/eH+McwiYsX+w4Rt/rCCCeX2EqXKYr1NvFqrz1FTzTiWaRKkYvydl1ZwhwSu08G6G/msB4xq0V9515+4356q9UpnOuMaaQ0I4We3kJ3TxUIieGNdklERASIDnD5darzbpytvVuhrwgI/r6s6nzAsHCKORto/LMerkAOLnGusZvrMPlWqS+gtrxFL8iayOuytcPbwjV4uZ+b5mZdQjTxdazr329Eh4hMYl+cWxkgAlB/O4i6Q== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4f38203-0991-4f16-60ce-08d58db0b7d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:47:23.9195 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0998 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Cooper [ Upstream commit 0aa0c12262fd848c48448c39ff6c1c097be00dd4 ] 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 driv= er") Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- drivers/phy/broadcom/phy-brcm-usb-init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadco= m/phy-brcm-usb-init.c index 1e7ce0b6f299..96370e61a000 100644 --- a/drivers/phy/broadcom/phy-brcm-usb-init.c +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c @@ -926,6 +926,7 @@ void brcm_usb_init_common(struct brcm_usb_init_params *= params) 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; } --=20 2.14.1