aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorMathias Nyman <[email protected]>2023-05-15 16:40:59 +0300
committerGreg Kroah-Hartman <[email protected]>2023-05-16 16:57:49 +0200
commitfe82f16aafdaf8002281d3b9524291d4a4a28460 (patch)
tree602d412e45886242ae42e159c5845f003befce32 /lib/mpi/mpi-bit.c
parent2a821fc3136d5d99dcb9de152be8a052ca27d870 (diff)
xhci: Fix incorrect tracking of free space on transfer rings
This incorrect tracking caused unnecessary ring expansion in some usecases which over days of use consume a lot of memory. xhci driver tries to keep track of free transfer blocks (TRBs) on the ring buffer, but failed to add back some cancelled transfers that were turned into no-op operations instead of just moving past them. This can happen if there are several queued pending transfers which then are cancelled in reverse order. Solve this by counting the numer of steps we move the dequeue pointer once we complete a transfer, and add it to the number of free trbs instead of just adding the trb number of the current transfer. This way we ensure we count the no-op trbs on the way as well. Fixes: 55f6153d8cc8 ("xhci: remove extra loop in interrupt context") Cc: [email protected] Reported-by: Miller Hunter <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217242 Tested-by: Miller Hunter <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions