Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751178AbdCQQwo (ORCPT ); Fri, 17 Mar 2017 12:52:44 -0400 Received: from netrider.rowland.org ([192.131.102.5]:34595 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751079AbdCQQwn (ORCPT ); Fri, 17 Mar 2017 12:52:43 -0400 Date: Fri, 17 Mar 2017 12:44:25 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Lipengcheng cc: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: EHCI In-Reply-To: <637796ED17F7774FB27D6AAE3C6951584A96C84B@SZXEMA509-MBS.china.huawei.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 18 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. Alan Stern