From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common: usb: Adding delay after set configuration to support legacy devices
Date: Thu, 17 Dec 2015 16:18:43 +0100 [thread overview]
Message-ID: <201512171618.43652.marex@denx.de> (raw)
In-Reply-To: <1450344097-3816-1-git-send-email-sriram.dash@freescale.com>
On Thursday, December 17, 2015 at 10:21:37 AM, Sriram Dash wrote:
> We faced random enumeration failure issue for USB sticks on XHCI driver,
> specifically the legacy i.e. USB 2.0 storage devices. It seems they do not
> respond to a USB string descriptor submission within the allowed U-Boot
> timeout, which is just after sending set configuration.
>
> USB stick where this this problem has been noticed are:
> SanDisk U3 Cruzer Micro 0875530C9FC38749 (Vendor: 0x0781, Product 0x5406)
>
> This problem has been reproduced on the Freescale LS2080A, and expected to
> be hit for any platform with XHCI controller using legacy USB 2.0 devices.
>
> This patch solves the above problem by:
> Adding 10 ms delay after set configuration and let the device to settle
> down
>
> Signed-off-by: Sriram Dash <sriram.dash@freescale.com>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@freescale.com>
> ---
> common/usb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/usb.c b/common/usb.c
> index 700bfc3..c624a88 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -1104,6 +1104,7 @@ int usb_select_config(struct usb_device *dev)
> "len %d, status %lX\n", dev->act_len, dev->status);
> return err;
> }
> + mdelay(10); /* Let the SET_CONFIGURATION settle */
> debug("new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
> dev->descriptor.iManufacturer, dev->descriptor.iProduct,
> dev->descriptor.iSerialNumber);
I suppose this should be isolated to USB 3.0 hosts, otherwise it will cause
slowdown on USB < 3.0 hosts as well and that's unwelcome.
Best regards,
Marek Vasut
prev parent reply other threads:[~2015-12-17 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 9:21 [U-Boot] [PATCH] common: usb: Adding delay after set configuration to support legacy devices Sriram Dash
2015-12-17 15:18 ` Marek Vasut [this message]
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=201512171618.43652.marex@denx.de \
--to=marex@denx.de \
--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