[U-Boot] [PATCH] ehci-hcd.c: fix hanging under higher load

Remy Bohmer linux at bohmer.net
Fri Oct 22 21:51:22 CEST 2010


Hi,

2010/10/22 Wolfgang Denk <wd at denx.de>:
> This patch solves a problem with USB hanging under higher load on a
> i.MX31 board.  It falls into class of typical USB problems and fixes:
> if you don't understand the real cause, add a delay somewhere.
>
> The problem appeared after introduction of ELF relocation, which
> results in smaller code, which appears to run faster (probably because
> it fits better in the cache); turning off the instruction cache,
> adding debug printf()s and increasing the delay have all been found to
> make the problem go away.
>
> Moving the original "udelay(1)" up in the code to it's new place made
> the problem appear much less frequently. Increasing the delay to 2
> microseconds then made the code run reliably in all (hour-long) tests.
> To be on the safe side, we set it to 5 microseconds here.
>
> Signed-off-by: Heiko schocher <hs at denx.de>
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> Cc: Remy Bohmer <linux at bohmer.net>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
>  drivers/usb/host/ehci-hcd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Not nice, but I do not see how this could harm something.
Applied to u-boot-usb.

Kind regards,

Remy


More information about the U-Boot mailing list