public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset()
@ 2010-11-26 14:44 Stefan Roese
  2010-11-26 20:24 ` Remy Bohmer
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-11-26 14:44 UTC (permalink / raw)
  To: u-boot

This patch fixes a problem noticed on lwmon5 (PPC440EPx) using the
common EHCI driver, when "usb reset" is issued multiple times.
Upon the 2nd (and further) "usb reset" command, the command fails
with the following messages:

=> usb reset
(Re)start USB...
USB:   Register 1111 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
=> usb reset
(Re)start USB...
USB:   EHCI fail to reset
Error, couldn't init Lowlevel part

This patch fixes this problem. Now "usb reset" can be called multiple
times.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
---
 drivers/usb/host/ehci-hcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index b88488e..3c40a76 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -230,7 +230,7 @@ static int ehci_reset(void)
 	int ret = 0;
 
 	cmd = ehci_readl(&hcor->or_usbcmd);
-	cmd |= CMD_RESET;
+	cmd = (cmd & ~CMD_RUN) | CMD_RESET;
 	ehci_writel(&hcor->or_usbcmd, cmd);
 	ret = handshake((uint32_t *)&hcor->or_usbcmd, CMD_RESET, 0, 250 * 1000);
 	if (ret < 0) {
-- 
1.7.3.2

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

* [U-Boot] [PATCH] usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset()
  2010-11-26 14:44 [U-Boot] [PATCH] usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset() Stefan Roese
@ 2010-11-26 20:24 ` Remy Bohmer
  0 siblings, 0 replies; 2+ messages in thread
From: Remy Bohmer @ 2010-11-26 20:24 UTC (permalink / raw)
  To: u-boot

Hi,

2010/11/26 Stefan Roese <sr@denx.de>:
> This patch fixes a problem noticed on lwmon5 (PPC440EPx) using the
> common EHCI driver, when "usb reset" is issued multiple times.
> Upon the 2nd (and further) "usb reset" command, the command fails
> with the following messages:
>
> => usb reset
> (Re)start USB...
> USB: ? Register 1111 NbrPorts 1
> USB EHCI 1.00
> scanning bus for devices... 5 USB Device(s) found
> ? ? ? scanning bus for storage devices... 2 Storage Device(s) found
> => usb reset
> (Re)start USB...
> USB: ? EHCI fail to reset
> Error, couldn't init Lowlevel part
>
> This patch fixes this problem. Now "usb reset" can be called multiple
> times.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> ---
> ?drivers/usb/host/ehci-hcd.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)

Applied to u-boot-usb. Thanks.

Kind regards,

Remy

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

end of thread, other threads:[~2010-11-26 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 14:44 [U-Boot] [PATCH] usb: Clear CMD_RUN while issuing CMD_RESET in ehci_reset() Stefan Roese
2010-11-26 20:24 ` Remy Bohmer

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