* [5/9] xhci: Don't always run the default stop endpoint command completion handler
@ 2018-03-16 14:33 Mathias Nyman
0 siblings, 0 replies; only message in thread
From: Mathias Nyman @ 2018-03-16 14:33 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Mathias Nyman
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>
---
drivers/usb/host/xhci-ring.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 88071c4..86476c6 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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(
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-16 14:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-16 14:33 [5/9] xhci: Don't always run the default stop endpoint command completion handler Mathias Nyman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).