Skip to content

Commit

Permalink
xhci: Don't always run the default stop endpoint command completion h…
Browse files Browse the repository at this point in the history
…andler

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: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Mathias Nyman authored and Greg Kroah-Hartman committed Mar 16, 2018
1 parent a400efe commit a38fe33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
case TRB_STOP_RING:
WARN_ON(slot_id != TRB_TO_SLOT_ID(
le32_to_cpu(cmd_trb->generic.field[3])));
xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event);
if (!cmd->completion)
xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event);
break;
case TRB_SET_DEQ:
WARN_ON(slot_id != TRB_TO_SLOT_ID(
Expand Down

0 comments on commit a38fe33

Please sign in to comment.