Skip to content

Commit bfa8459

Browse files
Michal Peciogregkh
authored andcommitted
usb: xhci: Complete 'error mid TD' transfers when handling Missed Service
Missed Service Error after an error mid TD means that the failed TD has already been passed by the xHC without acknowledgment of the final TRB, a known hardware bug. So don't wait any more and give back the TD. Reproduced on NEC uPD720200 under conditions of ludicrously bad USB link quality, confirmed to behave as expected using dynamic debug. Signed-off-by: Michal Pecio <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 58d0a3f commit bfa8459

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/usb/host/xhci-ring.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2752,7 +2752,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
27522752
xhci_dbg(xhci,
27532753
"Miss service interval error for slot %u ep %u, set skip flag\n",
27542754
slot_id, ep_index);
2755-
return 0;
2755+
break;
27562756
case COMP_NO_PING_RESPONSE_ERROR:
27572757
ep->skip = true;
27582758
xhci_dbg(xhci,
@@ -2800,6 +2800,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
28002800
xhci_dequeue_td(xhci, td, ep_ring, td->status);
28012801
}
28022802

2803+
/* Missed TDs will be skipped on the next event */
2804+
if (trb_comp_code == COMP_MISSED_SERVICE_ERROR)
2805+
return 0;
2806+
28032807
if (list_empty(&ep_ring->td_list)) {
28042808
/*
28052809
* Don't print wanings if ring is empty due to a stopped endpoint generating an

0 commit comments

Comments
 (0)