Skip to content

Commit fe49df6

Browse files
matnymangregkh
authored andcommitted
xhci: Mitigate failed set dequeue pointer commands
Avoid xHC host from processing a cancelled URB by always turning cancelled URB TDs into no-op TRBs before queuing a 'Set TR Deq' command. If the command fails then xHC will start processing the cancelled TD instead of skipping it once endpoint is restarted, causing issues like Babble error. This is not a complete solution as a failed 'Set TR Deq' command does not guarantee xHC TRB caches are cleared. Fixes: 4db3569 ("xhci: turn cancelled td cleanup to its own function") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20241016140000.783905-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6599b6a commit fe49df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/host/xhci-ring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ static int xhci_invalidate_cancelled_tds(struct xhci_virt_ep *ep)
10231023
td_to_noop(xhci, ring, cached_td, false);
10241024
cached_td->cancel_status = TD_CLEARED;
10251025
}
1026-
1026+
td_to_noop(xhci, ring, td, false);
10271027
td->cancel_status = TD_CLEARING_CACHE;
10281028
cached_td = td;
10291029
break;

0 commit comments

Comments
 (0)