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

Commit b1dc41a7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: xhci: clean up command queue on HC halt failure as well" into msm-4.9

parents 4f4dc0b3 a7806bc3
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -113,8 +113,12 @@ int xhci_halt(struct xhci_hcd *xhci)

	ret = xhci_handshake(&xhci->op_regs->status,
			STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
	if (!ret) {
	if (!ret)
		xhci->xhc_state |= XHCI_STATE_HALTED;
	else
		xhci_warn(xhci, "Host not halted after %u microseconds.\n",
				XHCI_MAX_HALT_USEC);

	xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;

	if (delayed_work_pending(&xhci->cmd_timer)) {
@@ -123,9 +127,7 @@ int xhci_halt(struct xhci_hcd *xhci)
		cancel_delayed_work(&xhci->cmd_timer);
		xhci_cleanup_command_queue(xhci);
	}
	} else
		xhci_warn(xhci, "Host not halted after %u microseconds.\n",
				XHCI_MAX_HALT_USEC);

	return ret;
}