xhci: fix isoc endpoint dequeue from advancing too far on transaction error
[firefly-linux-kernel-4.4.55.git] / drivers / usb / host / xhci-ring.c
index f5397a517c54ce5a7df00b60e4b2482a2fd8b16c..ae0894c7ee1174e6daf52ca2296527e7557456bc 100644 (file)
@@ -2026,8 +2026,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
                break;
        case COMP_DEV_ERR:
        case COMP_STALL:
+               frame->status = -EPROTO;
+               skip_td = true;
+               break;
        case COMP_TX_ERR:
                frame->status = -EPROTO;
+               if (event_trb != td->last_trb)
+                       return 0;
                skip_td = true;
                break;
        case COMP_STOP: