]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Fix 5.12 regression of missing xHC cache clearing command after a Stall
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 25 May 2021 07:41:00 +0000 (10:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 May 2021 08:21:47 +0000 (10:21 +0200)
commit7614bb1e4abb9485650c8478ab6dbbf6a13e9a74
treed66df09b04bceb4a37c8f9c19a90a833a394fa37
parenta7b736b13a4c3f4389cef7e75f880a21365981e4
xhci: Fix 5.12 regression of missing xHC cache clearing command after a Stall

If endpoints halts due to a stall then the dequeue pointer read from
hardware may already be set ahead of the stalled TRB.
After commit 41d14eb559fb ("xhci: split handling halted endpoints into two
steps") in 5.12 xhci driver won't issue a Set TR Dequeue if hardware
dequeue pointer is already in the right place.

Turns out the "Set TR Dequeue pointer" command is anyway needed as it in
addition to moving the dequeue pointer also clears endpoint state and
cache.

Fixes: 41d14eb559fb ("xhci: split handling halted endpoints into two steps")
Cc: <stable@vger.kernel.org> # 5.12
Reported-by: Peter Ganzhorn <peter.ganzhorn@googlemail.com>
Tested-by: Peter Ganzhorn <peter.ganzhorn@googlemail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210525074100.1154090-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c