Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 960be8d0 authored by Hemant Kumar's avatar Hemant Kumar Committed by Jack Pham
Browse files

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: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent a62bf713
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -334,14 +334,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");