[PATCH] usb: Add delay for control messages to reach usb stick

Ashok Reddy Soma ashok.reddy.soma at amd.com
Fri Aug 26 07:35:33 CEST 2022


We are seeing timing issues with transcend usb sticks. These devices
seems to require more time than regular devices for the control messages
to reach device. Add 1ms delay before sending control message to fix
trancend device detection issue.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
---

 common/usb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/usb.c b/common/usb.c
index 6fcf1e8428..3fae32b048 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -241,6 +241,12 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
 	      request, requesttype, value, index, size);
 	dev->status = USB_ST_NOT_PROC; /*not yet processed */
 
+	/* Timing issues are observed with transcend usb sticks such as
+	 * “Transcend Jetflash 350 USB2.0". Add 1ms delay for the usb
+	 * device to get detected.
+	 */
+	mdelay(1);
+
 	err = submit_control_msg(dev, pipe, data, size, setup_packet);
 	if (err < 0)
 		return err;
-- 
2.17.1



More information about the U-Boot mailing list