]> git.itanic.dy.fi Git - linux-stable/commit
xhci: simplify event ring dequeue tracking for transfer events
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 19 Oct 2023 10:29:17 +0000 (13:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 10:38:54 +0000 (12:38 +0200)
commit3321f84bfae010f257de77b9f9a96d9bae183cf6
tree5f83d94c25410f5a89e799a71187091e53db0eba
parent3c45a21fd5d49966fa8bb39f50ae52f6aa9ec999
xhci: simplify event ring dequeue tracking for transfer events

No matter what type of event we receive we want to increase the event
ring dequeue pointer one step for every event that is handled.

For unknown reasons the event ring dequeue increase is done inside the
transfer event handler and port event handler.

As the transfer event handler got more complex and can now loop through
several transfer TRBs on a transfer ring, there were additinal checks
added to avoid increasing event ring dequeue more than one step.

No need for elaborate checks to avoid increasing event ring dequeue
in case the transfer event handler goes through a loop.
Just increasing the event ring dequeue outside the transfer event
handler.

End goal is to increase event ring dequeue in just one place.

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