]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
94ce57fa2b9e66cf436bc3ff5be9f089090b34a8
[thirdparty/kernel/stable-queue.git] /
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"
5
6 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7
8 This reverts commit 9a24eb8010c2dc6a2eba56e3eb9fc07d14ffe00a which is
9 commit 66cb618bf0bb82859875b00eeffaf223557cb416 upstream.
10
11 In backporting it to stable kernels, it causes a severe regression on
12 many systems, so revert it for now.
13
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>
21 Cc: <ZeroBeat@gmx.de>
22 Cc: Salvatore Bonaccorso <carnil@debian.org>
23 Cc: Sasha Levin <sashal@kernel.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 drivers/usb/host/xhci-ring.c | 5 ++---
27 1 file changed, 2 insertions(+), 3 deletions(-)
28
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
32 else
33 xhci_handle_halted_endpoint(xhci, ep, NULL,
34 EP_SOFT_RESET);
35 - break;
36 + goto cleanup;
37 case COMP_RING_UNDERRUN:
38 case COMP_RING_OVERRUN:
39 case COMP_STOPPED_LENGTH_INVALID:
40 - break;
41 + goto cleanup;
42 default:
43 xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n",
44 slot_id, ep_index);
45 goto err_out;
46 }
47 - return 0;
48 }
49
50 /* Count current td numbers if ep->skip is set */