summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2018-03-12 12:38:06 -0700
committerChandana Kishori Chiluveru <cchiluve@codeaurora.org>2019-03-22 12:08:47 +0530
commit47fae5d1652c1632a6fdc6cd10f3ea843de6e2fe (patch)
treedfbdbbae412e5e7670b5128bb35d07cbace4aac7
parent7de60546d8f15bff71b885d508ce288f3b0a0914 (diff)
usb: xhci: Reduce command abort handshake timeout
Once command completion times out (5 sec), command abort operation is currently perfomed with local irq disabled and spinlock held for 5 sec timeout. In case xHC becomes unresponsive for some reason this results into watchdog bark. Hence reduce timeout value from 5 sec to 1 sec to initiate recovery faster. Change-Id: I1383721ce1d25bc40fb0e7620135fafcba6d5640 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Jack Pham <jackp@codeaurora.org>
-rw-r--r--drivers/usb/host/xhci-ring.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7307cb0a62b2..c0fc063f828a 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -354,14 +354,13 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
&xhci->op_regs->cmd_ring);
/* Section 4.6.1.2 of xHCI 1.0 spec says software should
- * time the completion od all xHCI commands, including
+ * time the completion of all xHCI commands, including
* the Command Abort operation. If software doesn't see
- * CRR negated in a timely manner (e.g. longer than 5
- * seconds), then it should assume that the there are
- * larger problems with the xHC and assert HCRST.
+ * CRR negated in a timely manner, then it should assume
+ * that the there are larger problems with the xHC and assert HCRST.
*/
ret = xhci_handshake_check_state(xhci, &xhci->op_regs->cmd_ring,
- CMD_RING_RUNNING, 0, 5 * 1000 * 1000);
+ CMD_RING_RUNNING, 0, 1000 * 1000);
if (ret < 0) {
xhci_err(xhci,
"Stop command ring failed, maybe the host is dead\n");