]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xhci: fix isoc endpoint dequeue from advancing too far on transaction error
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 30 Apr 2015 14:16:02 +0000 (17:16 +0300)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:38 +0000 (09:20 +0800)
commit d104d0152a97fade389f47635b73a9ccc7295d0b upstream.

Isoc TDs usually consist of one TRB, sometimes two. When all goes well we
receive only one success event for a TD, and move the dequeue pointer to
the next TD.

This fails if the TD consists of two TRBs and we get a transfer error
on the first TRB, we will then see two events for that TD.

Fix this by making sure the event we get is for the last TRB in that TD
before moving the dequeue pointer to the next TD. This will resolve some
of the uvc and dvb issues with the
"ERROR Transfer event TRB DMA ptr not part of current TD" error message

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/usb/host/xhci-ring.c

index e47a4e12b297addd3b22e552d2138388e43c5ff7..744e97e7db532a93aa7d8ff92095e09038f9887a 100644 (file)
@@ -2129,8 +2129,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: