Skip to content

Commit

Permalink
usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests
Browse files Browse the repository at this point in the history
commit d86db25 upstream.

The DELAY_INIT quirk only reduces the frequency of enumeration failures
with the Logitech HD Pro C920 and C930e webcams, but does not quite
eliminate them. We have found that adding a delay of 100ms between the
first and second Get Configuration request makes the device enumerate
perfectly reliable even after several weeks of extensive testing. The
reasons for that are anyone's guess, but since the DELAY_INIT quirk
already delays enumeration by a whole second, wating for another 10th of
that isn't really a big deal for the one other device that uses it, and
it will resolve the problems with these webcams.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Julius Werner authored and Ben Hutchings committed Apr 1, 2014
1 parent e226584 commit 3e2ac23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/core/config.c
Original file line number Diff line number Diff line change
@@ -722,6 +722,10 @@ int usb_get_configuration(struct usb_device *dev)
result = -ENOMEM;
goto err;
}

if (dev->quirks & USB_QUIRK_DELAY_INIT)
msleep(100);

result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,
bigbuffer, length);
if (result < 0) {

0 comments on commit 3e2ac23

Please sign in to comment.