Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751117AbdCREuX convert rfc822-to-8bit (ORCPT ); Sat, 18 Mar 2017 00:50:23 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:57071 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750712AbdCREuW (ORCPT ); Sat, 18 Mar 2017 00:50:22 -0400 From: Lipengcheng To: Alan Stern CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: EHCI Thread-Topic: EHCI Thread-Index: AdKewHkD+R5ARzBOQKq5CFMdPJo67QAOjVCAACl+eMA= Date: Sat, 18 Mar 2017 04:43:55 +0000 Message-ID: <637796ED17F7774FB27D6AAE3C6951584A96DC6D@SZXEMA509-MBS.china.huawei.com> References: <637796ED17F7774FB27D6AAE3C6951584A96C84B@SZXEMA509-MBS.china.huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.222.17] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.58CCBB0F.03A9,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.2.147, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: de6a610b9f9fe182e6ad905695e99c75 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1237 Lines: 29 Hi, > -----Original Message----- > From: Alan Stern [mailto:stern@rowland.harvard.edu] > Sent: Saturday, March 18, 2017 12:44 AM > To: Lipengcheng > Cc: gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: EHCI > > On Fri, 17 Mar 2017, Lipengcheng wrote: > > > Hi, > > In the ehci-hub.c,the ehci_handshake(ehci, status_reg, PORT_RESET, 0, > > 1000) use that the timeout is 1000us. The 1000us timeout can not > > satisfy all the chips. The EHCI protocol describes:A host controller > > must terminate the reset and stabilize the state of the port within 2 > > milliseconds of software transitioning this bit from a one to a zero. > > So I think timeout time is set to 2000us more appropriate. If I set > > the timeout time is set to 2000us and may it produce side effects? > > That is a long time to wait with interrupts disabled. You probably should release the spinlock and enable interrupts during the handshake. > > Have you seen any errors with the current 1000 us value? If you haven't, there's no reason to change the code. > Yes, I have some error -110(-ETIMEDOUT) with the current 1000us value. When I set the value 2000us, it is ok. > Alan Stern Best Regards, Pengcheng Li