[PATCH 3/5] usb: wait after setting device configuration
Ahmad Fatoum
a.fatoum at barebox.org
Fri Jun 26 10:31:39 PDT 2026
Port over U-Boot commit f647bf0ba36a5236d4bc7f93d39bfacfb1cfe6c7:
| usb: Wait after sending Set Configuration request
|
| Some devices, like the SanDisk Cruzer Pop need some time to process
| the Set Configuration request, so wait a little until they are ready.
|
| Signed-off-by: Marek Vasut <marex at denx.de>
| Cc: Chin Liang See <clsee at altera.com>
| Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
| Cc: Hans de Goede <hdegoede at redhat.com>
| Cc: Stefan Roese <sr at denx.de>
| Cc: Stephen Warren <swarren at nvidia.com>
Assisted-by: Codex:gpt-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
drivers/usb/core/usb.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index c6b3187de17d..145b85a28fab 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -539,6 +539,14 @@ int usb_new_device(struct usb_device *dev)
dev->act_len, dev->status);
goto err_out;
}
+
+ /*
+ * Wait until the Set Configuration request gets processed by the
+ * device. This is required by at least SanDisk Cruzer Pop USB 2.0
+ * and Kingston DT Ultimate 32GB USB 3.0 on DWC2 OTG controller.
+ */
+ mdelay(10);
+
dev_dbg(&dev->dev, "new device: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev->descriptor->iManufacturer, dev->descriptor->iProduct,
dev->descriptor->iSerialNumber);
--
2.47.3
More information about the barebox
mailing list