public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: increase delay after port reset
@ 2011-11-10  0:03 Ilya Yanok
  2011-11-10  1:09 ` Mike Frysinger
  2012-04-02 17:29 ` Marek Vasut
  0 siblings, 2 replies; 7+ messages in thread
From: Ilya Yanok @ 2011-11-10  0:03 UTC (permalink / raw)
  To: u-boot

In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
dongle devices connected via several hubs) keyboard fails to initialize
during the bus scan (stalled endpoint while get_descriptor/64) and after
that keyboard is unusable (even in Linux) until power off/on.

Increasing the delay after port reset from 200ms to 260ms solves this
problem.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 common/usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index bed5116..5e282c6 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1147,7 +1147,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)
 		return;
 	}
 
-	wait_ms(200);
+	wait_ms(260);
 
 	/* Allocate a new device struct for it */
 	usb = usb_alloc_new_device();
-- 
1.7.6.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2011-11-10  0:03 [U-Boot] [PATCH] usb: increase delay after port reset Ilya Yanok
@ 2011-11-10  1:09 ` Mike Frysinger
  2011-11-16 21:17   ` Ilya Yanok
  2012-04-02 17:29 ` Marek Vasut
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-11-10  1:09 UTC (permalink / raw)
  To: u-boot

On Wednesday 09 November 2011 19:03:58 Ilya Yanok wrote:
> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
> dongle devices connected via several hubs) keyboard fails to initialize
> during the bus scan (stalled endpoint while get_descriptor/64) and after
> that keyboard is unusable (even in Linux) until power off/on.
> 
> Increasing the delay after port reset from 200ms to 260ms solves this
> problem.

ugh.  this doesn't sound like the right way to fix things.  looks like Linux 
has added a dynamic polling state that automatically deals with broken 
devices.  look at its hub_port_debounce.  seems like we should implement 
something like that instead of delaying longer and longer and making the 
situation needlessly worse for most systems.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111109/d8433847/attachment.pgp 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2011-11-10  1:09 ` Mike Frysinger
@ 2011-11-16 21:17   ` Ilya Yanok
  0 siblings, 0 replies; 7+ messages in thread
From: Ilya Yanok @ 2011-11-16 21:17 UTC (permalink / raw)
  To: u-boot

Hi Mike,

On 10.11.2011 05:09, Mike Frysinger wrote:
> On Wednesday 09 November 2011 19:03:58 Ilya Yanok wrote:
>> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
>> dongle devices connected via several hubs) keyboard fails to initialize
>> during the bus scan (stalled endpoint while get_descriptor/64) and after
>> that keyboard is unusable (even in Linux) until power off/on.
>>
>> Increasing the delay after port reset from 200ms to 260ms solves this
>> problem.
> 
> ugh.  this doesn't sound like the right way to fix things.  looks like Linux 
> has added a dynamic polling state that automatically deals with broken 
> devices.  look at its hub_port_debounce.  seems like we should implement 
> something like that instead of delaying longer and longer and making the 
> situation needlessly worse for most systems.

Thanks for the pointer. Unfortunately I don't have time to look into
this deeper and we will go with a workaround for now.

Maybe we will return to this later.

Regards, Ilya.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2011-11-10  0:03 [U-Boot] [PATCH] usb: increase delay after port reset Ilya Yanok
  2011-11-10  1:09 ` Mike Frysinger
@ 2012-04-02 17:29 ` Marek Vasut
  2012-04-02 19:00   ` Ilya Yanok
  1 sibling, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2012-04-02 17:29 UTC (permalink / raw)
  To: u-boot

Dear Ilya Yanok,

> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
> dongle devices connected via several hubs) keyboard fails to initialize
> during the bus scan (stalled endpoint while get_descriptor/64) and after
> that keyboard is unusable (even in Linux) until power off/on.
> 
> Increasing the delay after port reset from 200ms to 260ms solves this
> problem.

Do we still have this problem?

> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  common/usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/common/usb.c b/common/usb.c
> index bed5116..5e282c6 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -1147,7 +1147,7 @@ void usb_hub_port_connect_change(struct usb_device
> *dev, int port) return;
>  	}
> 
> -	wait_ms(200);
> +	wait_ms(260);
> 
>  	/* Allocate a new device struct for it */
>  	usb = usb_alloc_new_device();

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2012-04-02 17:29 ` Marek Vasut
@ 2012-04-02 19:00   ` Ilya Yanok
  2012-04-03 15:19     ` Stefano Babic
  0 siblings, 1 reply; 7+ messages in thread
From: Ilya Yanok @ 2012-04-02 19:00 UTC (permalink / raw)
  To: u-boot

Hi Marek, Stefano,

On 02.04.2012 21:29, Marek Vasut wrote:
>> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
>> dongle devices connected via several hubs) keyboard fails to initialize
>> during the bus scan (stalled endpoint while get_descriptor/64) and after
>> that keyboard is unusable (even in Linux) until power off/on.
>>
>> Increasing the delay after port reset from 200ms to 260ms solves this
>> problem.
> 
> Do we still have this problem?

Sorry, I'm not working with this board any more. I'm ccing Stefano,
probably he can answer.

Regards, Ilya.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2012-04-02 19:00   ` Ilya Yanok
@ 2012-04-03 15:19     ` Stefano Babic
  2012-04-03 16:16       ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Stefano Babic @ 2012-04-03 15:19 UTC (permalink / raw)
  To: u-boot

On 02/04/2012 21:00, Ilya Yanok wrote:
> Hi Marek, Stefano,

Hi Marek,

> 
> On 02.04.2012 21:29, Marek Vasut wrote:
>>> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
>>> dongle devices connected via several hubs) keyboard fails to initialize
>>> during the bus scan (stalled endpoint while get_descriptor/64) and after
>>> that keyboard is unusable (even in Linux) until power off/on.
>>>
>>> Increasing the delay after port reset from 200ms to 260ms solves this
>>> problem.
>>
>> Do we still have this problem?
> 
> Sorry, I'm not working with this board any more. I'm ccing Stefano,
> probably he can answer.

USB seems not working on this board, but the patch does not help. No
peripheral are found after bus scan, even if the delay is increased by
the patch. I will suggest to not apply this patch for the release and I
will try to investigate what is gone wrong on this board.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] usb: increase delay after port reset
  2012-04-03 15:19     ` Stefano Babic
@ 2012-04-03 16:16       ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2012-04-03 16:16 UTC (permalink / raw)
  To: u-boot

Dear Stefano Babic,

> On 02/04/2012 21:00, Ilya Yanok wrote:
> > Hi Marek, Stefano,
> 
> Hi Marek,
> 
> > On 02.04.2012 21:29, Marek Vasut wrote:
> >>> In our setup (OMAP3 EHCI host, keyboard, mouse mass storage and BT
> >>> dongle devices connected via several hubs) keyboard fails to initialize
> >>> during the bus scan (stalled endpoint while get_descriptor/64) and
> >>> after that keyboard is unusable (even in Linux) until power off/on.
> >>> 
> >>> Increasing the delay after port reset from 200ms to 260ms solves this
> >>> problem.
> >> 
> >> Do we still have this problem?
> > 
> > Sorry, I'm not working with this board any more. I'm ccing Stefano,
> > probably he can answer.
> 
> USB seems not working on this board, but the patch does not help. No
> peripheral are found after bus scan, even if the delay is increased by
> the patch. I will suggest to not apply this patch for the release and I
> will try to investigate what is gone wrong on this board.
> 
> Best regards,
> Stefano Babic

Ok, discarding from patchwork. Thanks!

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-03 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  0:03 [U-Boot] [PATCH] usb: increase delay after port reset Ilya Yanok
2011-11-10  1:09 ` Mike Frysinger
2011-11-16 21:17   ` Ilya Yanok
2012-04-02 17:29 ` Marek Vasut
2012-04-02 19:00   ` Ilya Yanok
2012-04-03 15:19     ` Stefano Babic
2012-04-03 16:16       ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox