--- drivers/usb/host/xhci-ring.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 376bcbe7b6e9..7b3a466705ab 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2451,6 +2451,14 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep, if (ep_trb != td->last_trb) td->error_mid_td = true; break; + case COMP_MISSED_SERVICE_ERROR: + /* seen in hosts conforming to xHCI revision 1.1 and later */ + xhci_info(xhci, "Handling Missed Service Error\n"); + frame->status = -EXDEV; + sum_trbs_for_length = true; + if (ep_trb != td->last_trb) + td->error_mid_td = true; + break; case COMP_INCOMPATIBLE_DEVICE_ERROR: case COMP_STALL_ERROR: frame->status = -EPROTO; @@ -2781,6 +2789,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, * short transfer when process the ep_ring next time. */ ep->skip = true; + td_num = list_count_nodes(&ep_ring->td_list); xhci_dbg(xhci, "Miss service interval error for slot %u ep %u, set skip flag\n", slot_id, ep_index); @@ -2977,7 +2986,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, process_bulk_intr_td(xhci, ep, ep_ring, td, ep_trb, event); cleanup: handling_skipped_tds = ep->skip && - trb_comp_code != COMP_MISSED_SERVICE_ERROR && + (trb_comp_code != COMP_MISSED_SERVICE_ERROR || ep_trb_dma) && trb_comp_code != COMP_RING_UNDERRUN && trb_comp_code != COMP_RING_OVERRUN && trb_comp_code != COMP_NO_PING_RESPONSE_ERROR; -- 2.43.0 --MP_/kFZhkHQc0cQiWe0r0J9unMN--