u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: Add delay for control messages to reach usb stick
@ 2022-08-26  5:35 Ashok Reddy Soma
  2022-08-26 19:37 ` Janne Grunau
  2022-08-28 21:41 ` Marek Vasut
  0 siblings, 2 replies; 5+ messages in thread
From: Ashok Reddy Soma @ 2022-08-26  5:35 UTC (permalink / raw)
  To: u-boot; +Cc: marex, michal.simek, git, git, Ashok Reddy Soma

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@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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-28 21:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26  5:35 [PATCH] usb: Add delay for control messages to reach usb stick Ashok Reddy Soma
2022-08-26 19:37 ` Janne Grunau
2022-08-27  0:20   ` Simon Glass
2022-08-27 10:40     ` Janne Grunau
2022-08-28 21:41 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).