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

Commit a38fe338 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman
Browse files

xhci: Don't always run the default stop endpoint command completion handler



The default stop endpoint completion handler will give back cancelled
URBs, and clean, or move past those canceller TRBs on the ring.

This is not always the preferred action.

If the stop endpoint command issuer is waiting for a completion
skip the default handler and just call the completion.

Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a400efe4
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1436,6 +1436,7 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
	case TRB_STOP_RING:
	case TRB_STOP_RING:
		WARN_ON(slot_id != TRB_TO_SLOT_ID(
		WARN_ON(slot_id != TRB_TO_SLOT_ID(
				le32_to_cpu(cmd_trb->generic.field[3])));
				le32_to_cpu(cmd_trb->generic.field[3])));
		if (!cmd->completion)
			xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event);
			xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event);
		break;
		break;
	case TRB_SET_DEQ:
	case TRB_SET_DEQ: