1 From 7008cd886178ff347ddbc3f962303a0655956eec Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Mon, 15 Jul 2024 08:49:12 +0200
4 Subject: Revert "usb: xhci: prevent potential failure in handle_tx_event() for Transfer events without TRB"
6 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 This reverts commit 9a24eb8010c2dc6a2eba56e3eb9fc07d14ffe00a which is
9 commit 66cb618bf0bb82859875b00eeffaf223557cb416 upstream.
11 In backporting it to stable kernels, it causes a severe regression on
12 many systems, so revert it for now.
14 Reported-by: Tim Lewis <elatllat@gmail.com>
15 Link: https://lore.kernel.org/r/CA+3zgmvct7BWib9A7O1ykUf=0nZpdbdpXBdPWOCqfPuyCT3fug@mail.gmail.com
16 Reported-by: <matthias@bodenbinder.de>
17 Link: https://lore.kernel.org/r/bug-219039-208809@https.bugzilla.kernel.org/
18 Cc: Niklas Neronin <niklas.neronin@linux.intel.com>
19 Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
20 Cc: MichaĆ Pecio <michal.pecio@gmail.com>
22 Cc: Salvatore Bonaccorso <carnil@debian.org>
23 Cc: Sasha Levin <sashal@kernel.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 drivers/usb/host/xhci-ring.c | 5 ++---
27 1 file changed, 2 insertions(+), 3 deletions(-)
29 --- a/drivers/usb/host/xhci-ring.c
30 +++ b/drivers/usb/host/xhci-ring.c
31 @@ -2649,17 +2649,16 @@ static int handle_tx_event(struct xhci_h
33 xhci_handle_halted_endpoint(xhci, ep, NULL,
37 case COMP_RING_UNDERRUN:
38 case COMP_RING_OVERRUN:
39 case COMP_STOPPED_LENGTH_INVALID:
43 xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n",
50 /* Count current td numbers if ep->skip is set */