]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xhci: Prevent infinite loop in transaction errors recovery for streams
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 30 Nov 2022 09:19:43 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:52 +0000 (13:26 +0100)
commite247183accbfb6dd23a666e39886be70bb9634b5
tree0c5749e69aef4aa374a38c0414f8b79799656300
parent41d68b0578e09304dc481946d6b64675126b174f
xhci: Prevent infinite loop in transaction errors recovery for streams

commit a1575120972ecd7baa6af6a69e4e7ea9213bde7c upstream.

Make sure to also limit the amount of soft reset retries for transaction
errors on streams in cases where the transaction error event doesn't point
to any specific TRB.

In these cases we don't know the TRB or stream ring, but we do know which
endpoint had the error.

To keep error counting simple and functional, move the current err_count
from ring structure to endpoint structure.

Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20221130091944.2171610-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h