[PATCH 2/5] usb: wait after initial device descriptor read
Ahmad Fatoum
a.fatoum at barebox.org
Fri Jun 26 10:31:38 PDT 2026
Port over U-Boot commit 3406e9d8afcc8ade8cb3e697be2bcf9cc85c9d04:
| usb: Add 1ms delay after first Get Descriptor request
|
| 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 at denx.de>
| Tested-by: Janne Grunau <j at jannau.net>
Assisted-by: Codex:gpt-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
drivers/usb/core/usb.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index ae87137447c7..c6b3187de17d 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -403,6 +403,17 @@ static int usb_setup_descriptor(struct usb_device *dev, bool do_read)
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;
dev->epmaxpacketout[0] = dev->descriptor->bMaxPacketSize0;
}
--
2.47.3
More information about the barebox
mailing list