diff mbox

[U-Boot,v2] usb: increase non-bulk timeout for slow chipsets.

Message ID 1312142998-11515-1-git-send-email-u-boot@lakedaemon.net
State Accepted
Commit 80b350a7ab83653242033877c203940db7ecc0e5
Headers show

Commit Message

u-boot@lakedaemon.net July 31, 2011, 8:09 p.m. UTC
If you take a look at 96820a35, you'll see the original timeout was
CONFIG_SYS_HZ.  Which is 1000.  After the mentioned change, non-bulk timeout
was changed to 100.  This causes timeout failures on the dreamplug platform
when trying to initialize the usb microsd reader.

Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
---
Changes since v1:
	- Further research identified the commit (96820a35) causing the problem
	  and revealed the former timeout of 1000.  Adjusted patch to use former
	  timeout.
	- Removed RFC.

 include/usb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

u-boot@lakedaemon.net Aug. 4, 2011, 3:19 p.m. UTC | #1
Remy,

I neglected to include you in my original submission, could you please
take a look at this for u-boot-usb?  Original email is here [1].  And
the commit I'm referring to is here [2].

The dreamplug platform must pull it's uImage from a usb attached microSD
card.  They are completely unbootable without this patch.  However, this
is a u-boot-wide change and I'm not familiar enough to say this won't
break something else.  Your insight would be appreciated.

thx,

Jason.

[1] http://patchwork.ozlabs.org/patch/107645/
[2]
http://git.denx.de/?p=u-boot.git;a=commit;h=96820a35873b4c005f732432c6a168decc9d22b9

On Sun, Jul 31, 2011 at 08:09:58PM +0000, Jason Cooper wrote:
> If you take a look at 96820a35, you'll see the original timeout was
> CONFIG_SYS_HZ.  Which is 1000.  After the mentioned change, non-bulk timeout
> was changed to 100.  This causes timeout failures on the dreamplug platform
> when trying to initialize the usb microsd reader.
> 
> Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> ---
> Changes since v1:
> 	- Further research identified the commit (96820a35) causing the problem
> 	  and revealed the former timeout of 1000.  Adjusted patch to use former
> 	  timeout.
> 	- Removed RFC.
> 
>  include/usb.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/usb.h b/include/usb.h
> index 53603a5..06170cd 100644
> --- a/include/usb.h
> +++ b/include/usb.h
> @@ -46,7 +46,7 @@
>   * This is the timeout to allow for submitting an urb in ms. We allow more
>   * time for a BULK device to react - some are slow.
>   */
> -#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100)
> +#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 1000)
>  
>  /* device request (setup) */
>  struct devrequest {
> -- 
> 1.7.0.4
>
Mike Frysinger Aug. 6, 2011, 11:47 a.m. UTC | #2
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Remy Bohmer Aug. 8, 2011, 8:35 p.m. UTC | #3
Hi,

2011/7/31 Jason Cooper <u-boot@lakedaemon.net>:
> If you take a look at 96820a35, you'll see the original timeout was
> CONFIG_SYS_HZ.  Which is 1000.  After the mentioned change, non-bulk timeout
> was changed to 100.  This causes timeout failures on the dreamplug platform
> when trying to initialize the usb microsd reader.
>
> Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>

Applied to u-boot-usb

Kind regards,

Remy
Remy Bohmer Aug. 8, 2011, 8:36 p.m. UTC | #4
Hi,

2011/8/4 Jason <u-boot@lakedaemon.net>:
> Remy,
>
> I neglected to include you in my original submission, could you please
> take a look at this for u-boot-usb?  Original email is here [1].  And
> the commit I'm referring to is here [2].

No problem...
I am subscribed to the list, and I have seen it already.
(I am a bit slow lately due to summer vacation, but I am catching up...)

Kind regards,

Remy
diff mbox

Patch

diff --git a/include/usb.h b/include/usb.h
index 53603a5..06170cd 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -46,7 +46,7 @@ 
  * This is the timeout to allow for submitting an urb in ms. We allow more
  * time for a BULK device to react - some are slow.
  */
-#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 100)
+#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 1000)
 
 /* device request (setup) */
 struct devrequest {