aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2012-07-23 19:06:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-26 18:12:12 -0400
commitb474a496850d10267320b7c2ff7c0ca09d2de8c9 (patch)
treeee0e9695dd2520df19edc0c2114bf79955279ac4
parent6216cf6ab8e7494da3fda76f9281a228198ce742 (diff)
xhci: Increase reset timeout for Renesas 720201 host.
commit 22ceac191211cf6688b1bf6ecd93c8b6bf80ed9b upstream. The NEC/Renesas 720201 xHCI host controller does not complete its reset within 250 milliseconds. In fact, it takes about 9 seconds to reset the host controller, and 1 second for the host to be ready for doorbell rings. Extend the reset and CNR polling timeout to 10 seconds each. This patch should be backported to kernels as old as 2.6.31, that contain the commit 66d4eadd8d067269ea8fead1a50fe87c2979a80d "USB: xhci: BIOS handoff and HW initialization." Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Edwin Klein Mentink <e.kleinmentink@zonnet.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 16ec4d3890b..fd1421ff0b4 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -163,7 +163,7 @@ int xhci_reset(struct xhci_hcd *xhci)
163 xhci_writel(xhci, command, &xhci->op_regs->command); 163 xhci_writel(xhci, command, &xhci->op_regs->command);
164 164
165 ret = handshake(xhci, &xhci->op_regs->command, 165 ret = handshake(xhci, &xhci->op_regs->command,
166 CMD_RESET, 0, 250 * 1000); 166 CMD_RESET, 0, 10 * 1000 * 1000);
167 if (ret) 167 if (ret)
168 return ret; 168 return ret;
169 169
@@ -172,7 +172,8 @@ int xhci_reset(struct xhci_hcd *xhci)
172 * xHCI cannot write to any doorbells or operational registers other 172 * xHCI cannot write to any doorbells or operational registers other
173 * than status until the "Controller Not Ready" flag is cleared. 173 * than status until the "Controller Not Ready" flag is cleared.
174 */ 174 */
175 return handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000); 175 return handshake(xhci, &xhci->op_regs->status,
176 STS_CNR, 0, 10 * 1000 * 1000);
176} 177}
177 178
178/* 179/*