Skip to content

Commit

Permalink
usb: Add 1ms delay after first Get Descriptor request
Browse files Browse the repository at this point in the history
Logitech Unifying Receiver 046d:c52b bcdDevice 12.10 seems
sensitive about the first Get Descriptor request. If there
are any other requests in the same microframe, the device
reports bogus data, first of the descriptor parts is not
sent to the host. Wait over one microframe duration before
issuing subsequent requests to avoid probe failure with
this device, since it can be used to connect USB keyboards.

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Janne Grunau <j@jannau.net>
  • Loading branch information
Marek Vasut authored and kettenis committed Nov 16, 2022
1 parent cbbeeec commit d1fe50e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions common/usb.c
Expand Up @@ -999,6 +999,17 @@ static int usb_setup_descriptor(struct usb_device *dev, bool do_read)
err = get_descriptor_len(dev, 64, 8);
if (err)
return err;

/*
* Logitech Unifying Receiver 046d:c52b bcdDevice 12.10 seems
* sensitive about the first Get Descriptor request. If there
* are any other requests in the same microframe, the device
* reports bogus data, first of the descriptor parts is not
* sent to the host. Wait over one microframe duration here
* (1mS for USB 1.x , 125uS for USB 2.0) to avoid triggering
* the issue.
*/
mdelay(1);
}

dev->epmaxpacketin[0] = dev->descriptor.bMaxPacketSize0;
Expand Down

0 comments on commit d1fe50e

Please sign in to comment.