Received: by 10.223.185.116 with SMTP id b49csp1111211wrg; Sat, 3 Mar 2018 15:54:32 -0800 (PST) X-Google-Smtp-Source: AG47ELsRuZk2Y0oVDal6M4DeLNQasuWml94QsoqawZq2ll/ohq+51jA0W4oZpZIHOEGGs4eqdzV9 X-Received: by 10.101.100.200 with SMTP id t8mr8573675pgv.120.1520121272528; Sat, 03 Mar 2018 15:54:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520121272; cv=none; d=google.com; s=arc-20160816; b=laqR7LaMyiKsEfJhOZHB5jVvuq4QIHkHGcqlE6SR/0sKtz3rCN4A87cIozyUjGQfi6 6qMsHe8SyDENideusmcXBlDpJkH1hdhLg55pOOwlQwMl2bngMIvurNy3ALrblN0qGihz Ix4knOR2H0NOAFMSavRRn+QYDJCgA/RS16nxpUo/QLSVYNYY0koq/JVdVwdIcoAE+M8M +yD5NWY2S5PWvpwtx/kERJsDyWp/pw5Qzjy5D2z/d3OSXs+eMrWwRLCaeNSGrznKG2sq 8XLXaiKgESzXB5VKCS1KE8oKFTGEEUlcgmMJMwSsTtdy1EBoWK0upq7iWOaLzdAh9ixW xpPw== 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=nXV6zhdz5NIJ9HV7k6EZdbki6Nh1rnqJcJuTGEMlxus=; b=MYh1dYpKB6qzXK2LbbrhzMZ+rbi3lvw2OeI8zyAQ2VhJgbaKAXT8poRgsyPi136m/k WhR5jZlWMUjkzODFB6XXd5NOgVIcm6k+h0UHcTLb+mZwpUcvTGOJPW963DkdAqdUiP4N IzSC0Sed8wW8jMan8KlP8dbkofQkEWHcYqtCdhQrEb3Z7Dc+uLPaieTxVM7m4rZK0HYd z4QrQFT57bIhhmuaR4l+PJ3BssPo6FIxcNVwjfxfqVJGI84h5N65/gL0BWP+8pd4OyrR gJbpPhTX1eGNRev8ZL7zUaj9iyH7Iu1zFYY+HFdorAhIMHOjoXNrCMSRK8AXkbuDmKCs ErQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=afXD8ZIv; 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 62-v6si6950957ple.491.2018.03.03.15.54.18; Sat, 03 Mar 2018 15:54:32 -0800 (PST) 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=afXD8ZIv; 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 S1752507AbeCCXxc (ORCPT + 99 others); Sat, 3 Mar 2018 18:53:32 -0500 Received: from mail-cys01nam02on0126.outbound.protection.outlook.com ([104.47.37.126]:47215 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933897AbeCCWc7 (ORCPT ); Sat, 3 Mar 2018 17:32:59 -0500 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=nXV6zhdz5NIJ9HV7k6EZdbki6Nh1rnqJcJuTGEMlxus=; b=afXD8ZIvB//c5axxSPvOaDpqbPorgggQZPIUjFvmacJ56xjSrydS7uD3xlnXyFjA2Dvnvh7bAw2aioKpjeNIGxlFqnrCsTjMvM3e8GCv9J9s62OIkDEM/xUasQJVJYGZXycNf+N428J6UQ9QkoxDyIiRMJ7njYC0sQOv70RwQdc= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1098.namprd21.prod.outlook.com (52.132.149.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:32:52 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:32:52 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Felipe Balbi , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 068/219] usb: dwc3: make sure UX_EXIT_PX is cleared Thread-Topic: [PATCH AUTOSEL for 4.9 068/219] usb: dwc3: make sure UX_EXIT_PX is cleared Thread-Index: AQHTsz74CEIcXYrBW0qTvsPf27ECbg== Date: Sat, 3 Mar 2018 22:28:35 +0000 Message-ID: <20180303222716.26640-68-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-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;MW2PR2101MB1098;7:spVrDarQI/OTulmEGYhVW3fCZ3TYjW1M/m+uFgHoNRMoRAj2IganWNjazFZxFCK8YcyyHvM2GgZQaa4fKAnvzJbl75siFL0edwsOcJBVkC8v0FzDXZgtq3WyxcN6i97VAcUuL9gR7etZ7zr+dB/W3JLM8FrIi0dbsHnThJDnM4LiDTbLK/ek8LASs+7lykpV8dW9aF56gTEorLol459Qk8VLwp89o72Y9idG8VaUZQ8GGj1l/PTWjyENZtgc7fBP x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 54795abd-2f20-4772-3ecc-08d58156b3e7 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1098; x-ms-traffictypediagnostic: MW2PR2101MB1098: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3231220)(944501244)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB1098;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1098; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(376002)(39380400002)(366004)(396003)(346002)(199004)(189003)(2906002)(8936002)(36756003)(6512007)(81156014)(10290500003)(81166006)(99286004)(6436002)(68736007)(478600001)(3846002)(22452003)(53936002)(8676002)(110136005)(54906003)(4326008)(316002)(76176011)(6116002)(7736002)(105586002)(305945005)(3660700001)(1076002)(14454004)(97736004)(575784001)(25786009)(186003)(72206003)(26005)(102836004)(86362001)(6666003)(2501003)(3280700002)(6506007)(5660300001)(10090500001)(59450400001)(66066001)(106356001)(5250100002)(2900100001)(2950100002)(86612001)(6486002)(107886003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1098;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: VR5LyTczkNsKG0H7fRZhHuPhTq3s/sFykSxXVfQfrAoHTghlsD6qlvkJFNy5ceUAdZW+1nl4RAY6Rq1dqBFbFmInjKnrty768l8DgsdRqU80DTq3SZ/0y8/6LQ3p87//akXegmJgoGxanLQ7NR9pdvHTs5HvmXWCB+J60MAvzqY= 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: 54795abd-2f20-4772-3ecc-08d58156b3e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:28:35.5569 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1098 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felipe Balbi [ Upstream commit 1966b8657d058ecb95031809b607bf3fd1e01c10 ] This bit is only supposed to be used with known buggy PHYs, however some platforms might erroneously set it. In order to avoid it, let's make sure this bit is always cleared. If some PHY needs this, we will need to add a quirk flag. Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc3/core.c | 6 ++++++ drivers/usb/dwc3/core.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index fea446900cad..a0c2b8b6edd0 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -463,6 +463,12 @@ static int dwc3_phy_setup(struct dwc3 *dwc) =20 reg =3D dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); =20 + /* + * Make sure UX_EXIT_PX is cleared as that causes issues with some + * PHYs. Also, this bit is not supposed to be used in normal operation. + */ + reg &=3D ~DWC3_GUSB3PIPECTL_UX_EXIT_PX; + /* * Above 1.94a, it is recommended to set DWC3_GUSB3PIPECTL_SUSPHY * to '0' during coreConsultant configuration. So default value diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 884c43714456..bc3678e9dcb1 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -223,6 +223,7 @@ #define DWC3_GUSB3PIPECTL_PHYSOFTRST (1 << 31) #define DWC3_GUSB3PIPECTL_U2SSINP3OK (1 << 29) #define DWC3_GUSB3PIPECTL_DISRXDETINP3 (1 << 28) +#define DWC3_GUSB3PIPECTL_UX_EXIT_PX (1 << 27) #define DWC3_GUSB3PIPECTL_REQP1P2P3 (1 << 24) #define DWC3_GUSB3PIPECTL_DEP1P2P3(n) ((n) << 19) #define DWC3_GUSB3PIPECTL_DEP1P2P3_MASK DWC3_GUSB3PIPECTL_DEP1P2P3(7) --=20 2.14.1