Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754544AbcKYNcO (ORCPT ); Fri, 25 Nov 2016 08:32:14 -0500 Received: from mail-db5eur01on0066.outbound.protection.outlook.com ([104.47.2.66]:15514 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753324AbcKYNcF (ORCPT ); Fri, 25 Nov 2016 08:32:05 -0500 From: Jerry Huang To: Alan Stern , Sriram Dash CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "julia.lawall@lip6.fr" , Ramneek Mehresh , Suresh Gupta Subject: RE: [PATCH] fsl/usb: Workarourd for USB erratum-A005697 Thread-Topic: [PATCH] fsl/usb: Workarourd for USB erratum-A005697 Thread-Index: AQHSRjXotONUOBA9ekapQ3gxU3f+DaDn/CwAgABeEwCAAJ9hMA== Date: Fri, 25 Nov 2016 02:52:48 +0000 Message-ID: References: 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.225.131] x-microsoft-exchange-diagnostics: 1;DB5PR0401MB1928;7:A8Zgkgkdiqrhrsh5E+eURe0CFP+lXuQxKDBPNm29QT2lrhzlwsf+QJ4lJjafKHWFY+KSxejHftVZRObe4jVVcGFFsjjkcZftslIrk3rYLDBHniYFxk78QxveaxiExzmdx/UsI2muWp6DrGHSht929Vy6RJ4i89rUqGOMCUmfHYd6fASl/EOcW2d4U62pvGOUPmQX3jGrxG6+HuyIPJ4DsqsUVf1ROMH9EMFnJJ1l8/V7xScMl/Uh4oepWUdS1GTzmi2ZeRAWzDC8sAbowQXN1vGWMmjOB9Jo+E+61S6gbyWowF7du/ugwK7VfgPtrag57DbSc6orGLeecaLBprN+QINMV/8Hd0vnLJtG+rUvjMs= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(7916002)(24454002)(377454003)(13464003)(199003)(189002)(33656002)(74316002)(39410400001)(3660700001)(68736007)(3280700002)(106116001)(2900100001)(106356001)(38730400001)(551934003)(105586002)(8676002)(2171001)(77096005)(81156014)(50986999)(54356999)(66066001)(76176999)(81166006)(189998001)(2950100002)(229853002)(5001770100001)(4326007)(6636002)(76576001)(6116002)(101416001)(102836003)(97736004)(39450400002)(3846002)(6506003)(9686002)(5660300001)(86362001)(7696004)(7846002)(122556002)(7736002)(92566002)(305945005)(8936002)(39380400001)(2906002)(39400400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR0401MB1928;H:DB5PR0401MB1813.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; x-ms-office365-filtering-correlation-id: dd20a75a-3b92-47a3-b499-08d414de2411 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR0401MB1928; 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)(3002001)(10201501046)(6055026)(6061324)(6041248)(6046074)(20161123555025)(20161123564025)(20161123560025)(20161123562025);SRVR:DB5PR0401MB1928;BCL:0;PCL:0;RULEID:;SRVR:DB5PR0401MB1928; x-forefront-prvs: 01371B902F spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Nov 2016 02:52:48.4306 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0401MB1928 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 quoted-printable to 8bit by mail.home.local id uAPDWIKM005980 Content-Length: 2033 Lines: 36 Hi, Alan, Maybe other USB controller does not need this delay. However, our silicon errata point out, in the USBDR controller, the PORTCx[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 ensure the port has entered SUSPEND status before initiating this port resume using the Force Port Resume (which is one bit for NXP silicon, not-EHCI compatible). I will add more comment to understand why we need this delay in next version. Best Regards Jerry Huang -----Original Message----- From: Alan Stern [mailto:stern@rowland.harvard.edu] Sent: Friday, November 25, 2016 12:54 AM To: Sriram Dash Cc: Jerry Huang ; gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; julia.lawall@lip6.fr; Ramneek Mehresh ; Suresh Gupta Subject: RE: [PATCH] fsl/usb: Workarourd for USB erratum-A005697 On Thu, 24 Nov 2016, Sriram Dash wrote: > >From: Changming Huang [mailto:jerry.huang@nxp.com] As per USB > >specification, in the Suspend state, the status bit does not change > >until the port is suspended. However, there may be a delay in > >suspending a port if there is a transaction currently in progress on the bus. > > > >In the USBDR controller, the PORTSCx[SUSP] bit changes immediately > >when the application sets it and not when the port is actually > >suspended > > > >Workaround for this issue involves waiting for a minimum of 10ms to > >allow the controller to go into SUSPEND state before proceeding ahead The USB core guarantees that there won't be any data transactions in progress when a root hub is suspended. There might possibly be an SOF transaction, but that doesn't take more than a few microseconds at most. Certainly nowhere near 10 ms! Given that we already perform a 150-us delay, is this change really needed? Alan Stern