]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
xhci: Fix commad ring abort, write all 64 bits to CRCR register.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 26 Nov 2021 12:23:40 +0000 (14:23 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 9 Dec 2021 10:10:52 +0000 (11:10 +0100)
commitf37ad7c24e28a7d25ed02bd6bfda49a78fc998d4
tree5ea784b0b89e7434c77426340722ae9ae5e9641c
parentb3614d17edc4d81ecba0e23b9acb08477dd81f6a
xhci: Fix commad ring abort, write all 64 bits to CRCR register.

BugLink: https://bugs.launchpad.net/bugs/1953731
commit 09f736aa95476631227d2dc0e6b9aeee1ad7ed58 upstream.

Turns out some xHC controllers require all 64 bits in the CRCR register
to be written to execute a command abort.

The lower 32 bits containing the command abort bit is written first.
In case the command ring stops before we write the upper 32 bits then
hardware may use these upper bits to set the commnd ring dequeue pointer.

Solve this by making sure the upper 32 bits contain a valid command
ring dequeue pointer.

The original patch that only wrote the first 32 to stop the ring went
to stable, so this fix should go there as well.

Fixes: ff0e50d3564f ("xhci: Fix command ring pointer corruption while aborting a command")
Cc: stable@vger.kernel.org
Tested-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20211126122340.1193239-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/usb/host/xhci-ring.c