From: David Brownell Date: Mon, 13 Jun 2005 14:15:28 +0000 (-0700) Subject: [PATCH] spin longer for ehci port reset completion X-Git-Tag: v3.12-rc1~43115^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c22fa3acbc2ef79ea57217643f6cd6d226963069;p=kernel%2Fkernel-generic.git [PATCH] spin longer for ehci port reset completion This makes the EHCI driver spin a bit longer before concluding that the port reset failed. "Obviously safe." It allows some devices to enumerate that previously didn't. We've seen a bunch of these problem reports recently, this will make some go away. As reported by Michael Zapf , some EHCI controllers seem to take forever to finish port resets and produce "port N reset error -110" type errors. Spinning a bit longer helps. Signed-off-by: David Brownell Signed-off-by: Linus Torvalds --- diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 429330bc..d7b4f79 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -439,9 +439,12 @@ static int ehci_hub_control ( /* force reset to complete */ writel (temp & ~PORT_RESET, &ehci->regs->port_status [wIndex]); + /* REVISIT: some hardware needs 550+ usec to clear + * this bit; seems too long to spin routinely... + */ retval = handshake ( &ehci->regs->port_status [wIndex], - PORT_RESET, 0, 500); + PORT_RESET, 0, 750); if (retval != 0) { ehci_err (ehci, "port %d reset error %d\n", wIndex + 1, retval);