From: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
To: <u-boot@lists.denx.de>
Cc: <marex@denx.de>, <michal.simek@amd.com>, <git@xilinx.com>,
<git@amd.com>, Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Subject: [PATCH] usb: Add delay for control messages to reach usb stick
Date: Thu, 25 Aug 2022 23:35:33 -0600 [thread overview]
Message-ID: <20220826053533.23805-1-ashok.reddy.soma@amd.com> (raw)
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
next reply other threads:[~2022-08-26 5:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 5:35 Ashok Reddy Soma [this message]
2022-08-26 19:37 ` [PATCH] usb: Add delay for control messages to reach usb stick Janne Grunau
2022-08-27 0:20 ` Simon Glass
2022-08-27 10:40 ` Janne Grunau
2022-08-28 21:41 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220826053533.23805-1-ashok.reddy.soma@amd.com \
--to=ashok.reddy.soma@amd.com \
--cc=git@amd.com \
--cc=git@xilinx.com \
--cc=marex@denx.de \
--cc=michal.simek@amd.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).