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

Commit fa00c86c 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"

parents ec3cc3d9 d69c50aa
Loading
Loading
Loading
Loading
+12 −9
Original line number Original line Diff line number Diff line
@@ -116,6 +116,11 @@ int xhci_halt(struct xhci_hcd *xhci)
			STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
			STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC);
	if (!ret) {
	if (!ret) {
		xhci->xhc_state |= XHCI_STATE_HALTED;
		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;
	xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;


	if (timer_pending(&xhci->cmd_timer)) {
	if (timer_pending(&xhci->cmd_timer)) {
@@ -124,9 +129,7 @@ int xhci_halt(struct xhci_hcd *xhci)
		del_timer(&xhci->cmd_timer);
		del_timer(&xhci->cmd_timer);
		xhci_cleanup_command_queue(xhci);
		xhci_cleanup_command_queue(xhci);
	}
	}
	} else

		xhci_warn(xhci, "Host not halted after %u microseconds.\n",
				XHCI_MAX_HALT_USEC);
	return ret;
	return ret;
}
}