From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 4 May 2016 11:10:10 -0600 Subject: [U-Boot] [PATCH 5/7] usb: Assure Get Descriptor request is in separate microframe In-Reply-To: <1462308680-9366-5-git-send-email-marex@denx.de> References: <1462308680-9366-1-git-send-email-marex@denx.de> <1462308680-9366-5-git-send-email-marex@denx.de> Message-ID: <572A2CF2.4020505@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/03/2016 02:51 PM, Marek Vasut wrote: > The Kingston DT Ultimate USB 3.0 stick is sensitive to this first > Get Descriptor request and if the request is not in a separate > microframe, the stick refuses to operate. Add slight delay, which > is enough for one microframe to pass on any USB spec revision. > diff --git a/common/usb.c b/common/usb.c > + /* > + * Kingston DT Ultimate 32GB USB 3.0 seems to be extremely sensitive > + * about this first Get Descriptor request. If there are any other > + * requests in the first microframe, the stick crashes. Wait about > + * one microframe duration here (1mS for USB 1.x , 125uS for USB 2.0). > + */ > + mdelay(1); Do we know the connection speed here? If so, we could sleep 1ms for USB1.x and 125us for USB2.x, thus reducing any performance impact. Still, this is a short delay that I think only happens once per actual device so perhaps it isn't worth it.