summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2024-10-16 16:59:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-22 15:56:49 +0200
commit894eee6f6af7915c467d7921a9e25cf199c671a2 (patch)
tree1054ea8b7f6b6df27a038e2f47c93b5d08624fce
parent8a3dc841e3433a142015f52cc33e5e036714da30 (diff)
downloadlinux-894eee6f6af7915c467d7921a9e25cf199c671a2.tar.gz
linux-894eee6f6af7915c467d7921a9e25cf199c671a2.tar.bz2
linux-894eee6f6af7915c467d7921a9e25cf199c671a2.zip
xhci: Mitigate failed set dequeue pointer commands
commit fe49df60cdb7c2975aa743dc295f8786e4b7db10 upstream. 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: 4db356924a50 ("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>
-rw-r--r--drivers/usb/host/xhci-ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 83cd36f5d9e4..023803a8ef7d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1006,7 +1006,7 @@ static int xhci_invalidate_cancelled_tds(struct xhci_virt_ep *ep)
td_to_noop(xhci, ring, cached_td, false);
cached_td->cancel_status = TD_CLEARED;
}
-
+ td_to_noop(xhci, ring, td, false);
td->cancel_status = TD_CLEARING_CACHE;
cached_td = td;
break;