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>
Wed, 30 Nov 2022 11:10:48 +0000 (12:10 +0100)
commita1575120972ecd7baa6af6a69e4e7ea9213bde7c
treedc5f64e7f0771163d10eb636cb80ebaed9110ba4
parentc3bbacd61baace2f4fbab17012c3d149df2d50f1
xhci: Prevent infinite loop in transaction errors recovery for streams

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