public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] usb: Wait after sending Set Configuration request
Date: Wed, 4 May 2016 17:45:28 +0800	[thread overview]
Message-ID: <1462355128.1898.18.camel@altera.com> (raw)
In-Reply-To: <5729A7BE.9020806@denx.de>

On Wed, 2016-05-04 at 09:41 +0200, Stefan Roese wrote:
> On 03.05.2016 22:51, Marek Vasut wrote:
> > Some devices, like the SanDisk Cruzer Pop need some time to process
> > the Set Configuration request, so wait a little until they are
> > ready.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Chin Liang See <clsee@altera.com>
> > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > Cc: Hans de Goede <hdegoede@redhat.com>
> > Cc: Stefan Roese <sr@denx.de>
> > Cc: Stephen Warren <swarren@nvidia.com>
> > ---
> >   common/usb.c | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> > 
> > diff --git a/common/usb.c b/common/usb.c
> > index 63429d4..205041b 100644
> > --- a/common/usb.c
> > +++ b/common/usb.c
> > @@ -1107,6 +1107,14 @@ int usb_select_config(struct usb_device
> > *dev)
> >   			"len %d, status %lX\n", dev->act_len, dev
> > ->status);
> >   		return err;
> >   	}
> > +
> > +	/*
> > +	 * Wait until the Set Configuration request gets processed
> > by the
> > +	 * device. This is required by at least SanDisk Cruzer Pop
> > USB 2.0
> > +	 * and Kingston DT Ultimate 32GB USB 3.0 on DWC2 OTG
> > controller.
> > +	 */
> > +	mdelay(10);
> > +
> >   	debug("new device strings: Mfr=%d, Product=%d,
> > SerialNumber=%d\n",
> >   	      dev->descriptor.iManufacturer, dev
> > ->descriptor.iProduct,
> >   	      dev->descriptor.iSerialNumber);
> > 
> 
> As you might have expected, I'm not a fan of adding new delays to
> the common USB code. As this negatively affects all platforms. Did
> you test these two sticks that require this delay on other platforms
> than SoCFPGA? I would be very interested to know, if these keys are
> successfully detected without this patch on other platforms. I
> don't have access to these USB keys, so I can't test it on my
> platforms.
> 

Actually this series of patches (include the delay) help for all my
problematic pen drives too. It sound to me these pen drives need time
to process. But at same time, its strange to me that the device didn't
NAK (as I added printout for NAK) to indicate that its busy.

Seems that this issue is noticed at Freescale too. 
http://lists.denx.de/pipermail/u-boot/2015-December/238434.html. Cc'ed
them as they might can share more details on this.

Chin Liang



> Thanks,
> Stefan

  reply	other threads:[~2016-05-04  9:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 20:51 [U-Boot] [PATCH 1/7] usb: Don't init pointer to zero, but NULL Marek Vasut
2016-05-03 20:51 ` [U-Boot] [PATCH 2/7] usb: dwc2: Resend setup packet in all fail cases Marek Vasut
2016-05-04  9:36   ` Chin Liang See
2016-05-03 20:51 ` [U-Boot] [PATCH 3/7] usb: dwc2: Throttle the setup packet resending Marek Vasut
2016-05-04  9:37   ` Chin Liang See
2016-05-04 17:08   ` Stephen Warren
2016-05-04 21:21     ` Marek Vasut
2016-05-06 18:04     ` Marek Vasut
2016-05-03 20:51 ` [U-Boot] [PATCH 4/7] usb: Wait after sending Set Configuration request Marek Vasut
2016-05-04  7:41   ` Stefan Roese
2016-05-04  9:45     ` Chin Liang See [this message]
2016-05-04 10:00       ` Stefan Roese
2016-05-04 10:24         ` Chin Liang See
2016-05-05  4:14       ` Sriram Dash
2016-05-04 10:21     ` Marek Vasut
2016-05-03 20:51 ` [U-Boot] [PATCH 5/7] usb: Assure Get Descriptor request is in separate microframe Marek Vasut
2016-05-04  8:03   ` Stefan Roese
2016-05-04 10:25     ` Marek Vasut
2016-05-04 17:10   ` Stephen Warren
2016-05-03 20:51 ` [U-Boot] [PATCH 6/7] usb: hub: Don't continue on get_port_status failure Marek Vasut
2016-05-04  8:05   ` Stefan Roese
2016-05-04  9:38     ` Chin Liang See
2016-05-03 20:51 ` [U-Boot] [PATCH 7/7] usb: hub: Increase the query delay Marek Vasut
2016-05-04  8:07   ` Stefan Roese
2016-05-04 11:39     ` Marek Vasut
2016-05-04 16:27       ` Stefan Roese
2016-05-04 17:11   ` Stephen Warren
2016-05-04 21:32   ` [U-Boot] [PATCH] " Marek Vasut
2016-05-04 21:34     ` Stephen Warren
2016-05-04 21:38       ` Marek Vasut
2016-05-04  7:36 ` [U-Boot] [PATCH 1/7] usb: Don't init pointer to zero, but NULL Stefan Roese
2016-05-04  9:35   ` Chin Liang See
2016-05-06 16:36 ` 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=1462355128.1898.18.camel@altera.com \
    --to=clsee@altera.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