Commit de14cf29 authored by Mathias Nyman's avatar Mathias Nyman Committed by Luis Henriques

xhci: fix isoc endpoint dequeue from advancing too far on transaction error

commit d104d015 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: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent daf639f6
...@@ -2061,8 +2061,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, ...@@ -2061,8 +2061,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
break; break;
case COMP_DEV_ERR: case COMP_DEV_ERR:
case COMP_STALL: case COMP_STALL:
frame->status = -EPROTO;
skip_td = true;
break;
case COMP_TX_ERR: case COMP_TX_ERR:
frame->status = -EPROTO; frame->status = -EPROTO;
if (event_trb != td->last_trb)
return 0;
skip_td = true; skip_td = true;
break; break;
case COMP_STOP: case COMP_STOP:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment