Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbdIEUWb (ORCPT ); Tue, 5 Sep 2017 16:22:31 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36553 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752176AbdIEUW1 (ORCPT ); Tue, 5 Sep 2017 16:22:27 -0400 X-Google-Smtp-Source: ADKCNb7X5LRkwODc0TeBxRoVif/JJl5v0am2HG543dgJ3sOGiRNDaSajKCtelWMniKR5RA2RHM13fg== Date: Tue, 5 Sep 2017 13:22:25 -0700 From: Guenter Roeck To: Dmitry Fleytman Cc: Greg Kroah-Hartman , Alan Stern , Samuel Thibault , Mathias Nyman , Johan Hovold , Geert Uytterhoeven , Eugene Korenevsky , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: Increase quirk delay for USB devices Message-ID: <20170905202225.GC16996@roeck-us.net> References: <20170905084059.28816-1-dmitry@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905084059.28816-1-dmitry@daynix.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1948 Lines: 59 On Tue, Sep 05, 2017 at 11:40:56AM +0300, Dmitry Fleytman wrote: > Commit e0429362ab15 > ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") > introduced quirk to workaround an issue with some Logitech webcams. > > The workaround is introducing delay for some USB operations. > > According to our testing, delay introduced by original commit > is not long enough and in rare cases we still see issues described > by the aforementioned commit. > > This patch increases delays introduced by original commit. > Having this patch applied we do not see those problems anymore. > > Signed-off-by: Dmitry Fleytman > --- > drivers/usb/core/config.c | 2 +- > drivers/usb/core/hub.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c > index 4be52c6..854c8d6 100644 > --- a/drivers/usb/core/config.c > +++ b/drivers/usb/core/config.c > @@ -852,7 +852,7 @@ int usb_get_configuration(struct usb_device *dev) > } > > if (dev->quirks & USB_QUIRK_DELAY_INIT) > - msleep(100); > + msleep(200); How did you determine the new delays ? Was it discussed with the vendor, or is it based on trial and error ? Either case, did you confirm that you need to increase both delays for the problem to disappear ? Thanks, Guenter > > result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, > bigbuffer, length); > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > index 822f8c5..78c2aca 100644 > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -4825,7 +4825,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, > goto loop; > > if (udev->quirks & USB_QUIRK_DELAY_INIT) > - msleep(1000); > + msleep(2000); > > /* consecutive bus-powered hubs aren't reliable; they can > * violate the voltage drop budget. if the new child has > -- > 2.7.4 >