MUSB timeout broken
Subsystems (2)
PATCH v2 1/1 MUSB timeout broken
Use pre-decrement to leave timeout at 0 when the timeout happens (which is what the timeout detecting code expects).
--- drivers/usb/musb/musb_hcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/musb/musb_hcd.c +1 -1
@@ -1114,7 +1114,7 @@ int usb_lowlevel_init(void)* should be a usb device connected. */ timeout = musb_cfg.timeout; -while (timeout--) +while (--timeout)if (readb (&musbr->devctl) &MUSB_DEVCTL_HM )break ;
Signature · 1 line
1.7.2.5
PATCH v2 1/1 MUSB timeout broken
Hi,
2011/7/4 Orjan Friberg <[email protected]>:
Quoted 13 lines
Use pre-decrement to leave timeout at 0 when the timeout happens (which is what the timeout detecting code expects).
Signed-off-by Orjan Friberg <[email protected]>---
?drivers/usb/musb/musb_hcd.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/usb/musb/musb_hcd.c +0
-0@@ -1114,7 +1114,7 @@ int usb_lowlevel_init(void)
Quoted 8 lines
? ? ? ? * should be a usb device connected.
? ? ? ? */
? ? ? ?timeout = musb_cfg.timeout;
- ? ? ? while (timeout--)
+ ? ? ? while (--timeout)
? ? ? ? ? ? ? ?if (readb(&musbr->devctl)&MUSB_DEVCTL_HM) ? ? ? ? ? ? ? ? ? ? ? ?break;
Applied to u-boot-usb
Thanks.
Remy
PATCH v2 1/1 MUSB timeout broken
Hi,
Quoted 9 lines
2011/7/4 Orjan Friberg <[email protected]>:
Quoted 8 lines
Use pre-decrement to leave timeout at 0 when the timeout happens (which is what the timeout detecting code expects).
Signed-off-by Orjan Friberg <[email protected]>---
?drivers/usb/musb/musb_hcd.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines
Quoted 5 lines
drivers/usb/musb/musb_hcd.c +0
-0@@ -1114,7 +1114,7 @@ int usb_lowlevel_init(void)Quoted 8 lines
? ? ? ? * should be a usb device connected.
? ? ? ? */
? ? ? ?timeout = musb_cfg.timeout;
- ? ? ? while (timeout--)
+ ? ? ? while (--timeout)
? ? ? ? ? ? ? ?if (readb(&musbr->devctl)&MUSB_DEVCTL_HM) ? ? ? ? ? ? ? ? ? ? ? ?break;Applied to u-boot-usb
Whoops... Not applied to u-boot-usb, since the timeout code is broken. It should wait for a certain time, not a certain count.
Kind regards,
Remy
PATCH v2 1/1 MUSB timeout broken
Quoted 2 lines · Remy Bohmer
Whoops... Not applied to u-boot-usb, since the timeout code is broken. It should wait for a certain time, not a certain count.
Agreed, patch withdrawn.
Signature · 2 lines
Orjan Friberg FlatFrog Laboratories AB