summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2015-04-30 17:16:02 +0300
committerZefan Li <lizefan@huawei.com>2015-09-18 09:20:38 +0800
commit3451d0f5d57416ab5417964eee9f9df6e6b83629 (patch)
treef4d82af7e1bb28c48bf0b882d751426f7d220db6
parentece8cda08af85d72b151b2071df2d92a16b291b1 (diff)
downloadlwn-3451d0f5d57416ab5417964eee9f9df6e6b83629.tar.gz
lwn-3451d0f5d57416ab5417964eee9f9df6e6b83629.zip
xhci: fix isoc endpoint dequeue from advancing too far on transaction error
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>
-rw-r--r--drivers/usb/host/xhci-ring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index e47a4e12b297..744e97e7db53 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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: