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

Commit 5f47fa47 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 when halting"

parents b45f5aa2 c9cabb7e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -118,6 +118,13 @@ int xhci_halt(struct xhci_hcd *xhci)
	if (!ret) {
		xhci->xhc_state |= XHCI_STATE_HALTED;
		xhci->cmd_ring_state = CMD_RING_STATE_STOPPED;

		if (timer_pending(&xhci->cmd_timer)) {
			xhci_dbg_trace(xhci, trace_xhci_dbg_init,
					"Cleanup command queue");
			del_timer(&xhci->cmd_timer);
			xhci_cleanup_command_queue(xhci);
		}
	} else
		xhci_warn(xhci, "Host not halted after %u microseconds.\n",
				XHCI_MAX_HALT_USEC);
@@ -3804,6 +3811,9 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,

	mutex_lock(&xhci->mutex);

	if (xhci->xhc_state)	/* dying or halted */
		goto out;

	if (!udev->slot_id) {
		xhci_dbg_trace(xhci, trace_xhci_dbg_address,
				"Bad Slot ID %d", udev->slot_id);