[U-Boot] [PATCH] usb: fix usb start problem with SMSC USB hub and Toshiba USB stick
Wolfgang Denk
wd at denx.de
Tue Oct 12 22:33:13 CEST 2010
Dear Remy,
In message <1283280314-10700-1-git-send-email-agust at denx.de> Anatolij
Gustschin wrote:
> Checking the status field of the qTD token in the current code
> do not take into acount cases where endpoint stall (halted) bit
> is set together with some other status bits. As a result clearing
> stall on an endpoint won't be done if other status bits were set.
>
> E.g. 'usb start' often fails with Toshiba USB stick 0x930/0x6545
> connected to the SMSC USB 2.0 hub 0x424/0x2514. Debugging the
> issue showed that while bulk IN transfers with length of 13 or
> 18 the status field of the qTD token sometimes indicates trans-
> action error (XactErr) and sometimes additionally endpoint halted
> state. In the latter case resetting the USB device in error
> recovery code fails as no clear stall request on the endpoint
> will be done. The patch fixes status field checking code to
> properly handle endpoint halted state.
>
> However this fix is not enough to solve 'usb start' problem
> with hub/stick combination mentioned above. Running with lot of
> debug code in ehci_submit_async() I've never seen the problem
> with usb stick recognition. After removing this debug code the
> similar problem sometimes showed up again. Therefore the patch
> also adds delay in ehci_submit_async() for above-mentioned
> hub/stick combination. Even without this delay the fix is an
> improvement since it fixes the problem with board freezy after
> subsequent failed 'usb start/stop' cycles as it was observed
> on mpc5121ads board.
>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> ---
> common/usb_storage.c | 5 +++--
> drivers/usb/host/ehci-hcd.c | 8 ++++++++
> 2 files changed, 11 insertions(+), 2 deletions(-)
Any comments on this?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A little retrospection shows that although many fine, useful software
systems have been designed by committees and built as part of
multipart projects, those software systems that have excited passio-
nate fans are those that are the products of one or a few designing
minds, great designers. Consider Unix, APL, Pascal, Modula, the
Smalltalk interface, even Fortran; and contrast them with Cobol,
PL/I, Algol, MVS/370, and MS-DOS. - Fred Brooks, Jr.
More information about the U-Boot
mailing list