aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2015-04-30 10:16:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-09 12:27:32 -0400
commitd104d0152a97fade389f47635b73a9ccc7295d0b (patch)
tree4188cccf32a785a4780751b1cf960ac07525ce3c /drivers/usb
parent17aeca11ec4938f166fe9f66b98fb61131de4aba (diff)
xhci: fix isoc endpoint dequeue from advancing too far on transaction error
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 Cc: <stable@vger.kernel.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-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 f5397a517c54..ae0894c7ee11 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2026,8 +2026,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
2026 break; 2026 break;
2027 case COMP_DEV_ERR: 2027 case COMP_DEV_ERR:
2028 case COMP_STALL: 2028 case COMP_STALL:
2029 frame->status = -EPROTO;
2030 skip_td = true;
2031 break;
2029 case COMP_TX_ERR: 2032 case COMP_TX_ERR:
2030 frame->status = -EPROTO; 2033 frame->status = -EPROTO;
2034 if (event_trb != td->last_trb)
2035 return 0;
2031 skip_td = true; 2036 skip_td = true;
2032 break; 2037 break;
2033 case COMP_STOP: 2038 case COMP_STOP: