Skip to content

Commit e1cf486

Browse files
Alex HeSarah Sharp
authored andcommitted
xHCI 1.0: Force Stopped Event(FSE)
FSE shall occur on the TD natural boundary. The software ep_ring dequeue pointer exceed the hardware ep_ring dequeue pointer in these cases of Table-3. As a result, the event_trb(pointed by hardware dequeue pointer) of the FSE can't be found in the current TD(pointed by software dequeue pointer). What should we do is to figured out the FSE case and skip over it. Signed-off-by: Alex He <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
1 parent d233363 commit e1cf486

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/usb/host/xhci-ring.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,20 @@ static int handle_tx_event(struct xhci_hcd *xhci,
20632063
/* Is this a TRB in the currently executing TD? */
20642064
event_seg = trb_in_td(ep_ring->deq_seg, ep_ring->dequeue,
20652065
td->last_trb, event_dma);
2066+
2067+
/*
2068+
* Skip the Force Stopped Event. The event_trb(event_dma) of FSE
2069+
* is not in the current TD pointed by ep_ring->dequeue because
2070+
* that the hardware dequeue pointer still at the previous TRB
2071+
* of the current TD. The previous TRB maybe a Link TD or the
2072+
* last TRB of the previous TD. The command completion handle
2073+
* will take care the rest.
2074+
*/
2075+
if (!event_seg && trb_comp_code == COMP_STOP_INVAL) {
2076+
ret = 0;
2077+
goto cleanup;
2078+
}
2079+
20662080
if (!event_seg) {
20672081
if (!ep->skip ||
20682082
!usb_endpoint_xfer_isoc(&td->urb->ep->desc)) {

0 commit comments

Comments
 (0)