From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754049AbcK1E0C (ORCPT ); Sun, 27 Nov 2016 23:26:02 -0500 Received: from mail-he1eur01on0062.outbound.protection.outlook.com ([104.47.0.62]:21471 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753790AbcK1EZ7 (ORCPT ); Sun, 27 Nov 2016 23:25:59 -0500 X-Greylist: delayed 1046 seconds by postgrey-1.27 at vger.kernel.org; Sun, 27 Nov 2016 23:25:58 EST From: Jerry Huang To: Sergei Shtylyov , "stern@rowland.harvard.edu" , "gregkh@linuxfoundation.org" CC: Ramneek Mehresh , "julia.lawall@lip6.fr" , Sriram Dash , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] fsl/usb: Workarourd for USB erratum-A005697 Thread-Topic: [PATCH v2] fsl/usb: Workarourd for USB erratum-A005697 Thread-Index: AQHSRs2gXD+2/7OzEUi53r13/5o7sqDprXKAgAQam/A= Date: Mon, 28 Nov 2016 03:53:02 +0000 Message-ID: References: <1480044248-6365-1-git-send-email-jerry.huang@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jerry.huang@nxp.com; x-originating-ip: [199.59.230.102] x-microsoft-exchange-diagnostics: 1;DB5PR0401MB1733;7:87q+OehfFurVfyUTMY+0Hp8+EH3vhpVCtOo79DEDfFpo7DxtGZEb4lc0JIFix1EOPawNfDAt/QQ8BYMwjq2V51pxwu0SslPoG9dJG7c1tAO/9o3RuYAksda2wrdhbGmzirvgkEcU/wQyZ9ZpDxLMPj2EEf2FlGku3JuygPiGiw0ne51Zao4b1G2or0rtOPQg0nmibGnZCNwHZknpLKzZT8OzQxLcVvj8npLrynqCAuXIYrdFwLCc6DenAcakBbfcAuTStChc80OB/kjkFwHgyDJI/cp6dEUEDTSYwg/UPIIC7ZXZyGdxisY6ehnrFCGdci9W+BIf9+yb7OCwAWuWV4DnrCz8C1tI/MusbtjCvSI= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(199003)(24454002)(377454003)(13464003)(39400400001)(4326007)(106356001)(3846002)(33656002)(2171001)(6506003)(68736007)(54356999)(8676002)(189998001)(102836003)(66066001)(76176999)(229853002)(2501003)(551934003)(50986999)(74316002)(5001770100001)(97736004)(122556002)(2906002)(76576001)(2900100001)(3660700001)(39380400001)(81166006)(105586002)(305945005)(101416001)(39410400001)(2201001)(7736002)(7846002)(9686002)(5660300001)(92566002)(6116002)(3280700002)(7696004)(2950100002)(106116001)(81156014)(38730400001)(39450400002)(77096006)(8936002)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR0401MB1733;H:DB5PR0401MB1813.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-correlation-id: 4de48ae7-ee87-4aa2-2e8d-08d417420da8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR0401MB1733; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197)(35762410373642); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6060326)(6045199)(6040361)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6061324)(6041248)(6046074)(20161123555025)(20161123564025)(20161123560025)(20161123562025);SRVR:DB5PR0401MB1733;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB1733; x-forefront-prvs: 01401330D1 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2016 03:53:02.9267 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB1733 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id uAS4QBu1029245 Thanks a lot for you look into this patch, I will fixed these typos. Best Regards Jerry Huang -----Original Message----- From: Sergei Shtylyov [mailto:sergei.shtylyov@cogentembedded.com] Sent: Friday, November 25, 2016 9:12 PM To: Jerry Huang ; stern@rowland.harvard.edu; gregkh@linuxfoundation.org Cc: Ramneek Mehresh ; julia.lawall@lip6.fr; Sriram Dash ; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] fsl/usb: Workarourd for USB erratum-A005697 Hello. On 11/25/2016 06:24 AM, Changming Huang wrote: > The EHCI specification states the following in the SUSP bit description: > In the Suspend state, the port is senstive to resume detection. Sensitive. > Note that the bit status does not change untile the port is suspended > and Until. > that there may be a delay in susupending a port if there is a > transaction Suspending. > currently in progress on the USB. > > However, in NXP USBDR controller, the PORTSCx[SUSP] bit changes > immediately when the application sets it and not when the port is actually suspended. > > So the application must wait for at least 10 milliseconds after a port > indicates that it is suspended, to make sure this port has entered > suspended state before initiating this port resume using the Force > Port Resume bit. This bit is for NXP controller, not EHCI compatible. > > Signed-off-by: Changming Huang > Signed-off-by: Ramneek Mehresh [...] > diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c > index 74f62d6..81e2310 100644 > --- a/drivers/usb/host/ehci-hub.c > +++ b/drivers/usb/host/ehci-hub.c > @@ -310,6 +310,13 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) > } > spin_unlock_irq(&ehci->lock); > > + if (changed && ehci_has_fsl_susp_errata(ehci)) > + /* Wait for at least 10 millisecondes to ensure the controller Milliseconds. > + * enter the suspend status before initiating a port resume > + * using the Fore Port Resume bit (Not-EHCI compatible). Maybe force? s/Not/non/ also. > + */ > + usleep_range(10000, 20000); > + > if ((changed && ehci->has_tdi_phy_lpm) || fs_idle_delay) { > /* > * Wait for HCD to enter low-power mode or for the bus [...] > @@ -703,10 +704,15 @@ struct ehci_tt { #if defined(CONFIG_PPC_85xx) > /* Some Freescale processors have an erratum (USB A-005275) in which > * incoming packets get corrupted in HS mode > + * Some Freescale processors have an erratum (USB A-005697) in which > + * we need to wait for 10ms for bus to fo into suspend mode after Fo? [...] MBR, Sergei