xhci: rework xhci internal endpoint halt state detection.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 26 Jun 2024 12:48:28 +0000 (15:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jun 2024 14:08:05 +0000 (16:08 +0200)
commit21b224d7475751a398dfb811e4f987671ef37ade
treeba026b39c48c1d78ead79ad08686ef58b1d91ad7
parentbde66d2dc4885241acdab811deebf5f93cc8378e
xhci: rework xhci internal endpoint halt state detection.

When xhci_requires_manual_halt_cleanup() was written it wasn't clear
that the xhci internal endpoint halt state always needs to be cleared
with a reset endpoint command. Functional stall cases additionally halt
the device side endpoint which requires class driver to clear the device
side halt with a CLEAR_FEATURE(ENDPOINT_HALT) request as well.

Clean up, rename, and make sure the new function always return true
when internal endpoint state is halted, including stall cases.

Based on related cleanup suggestion code by Niklas Neronin

cc: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240626124835.1023046-15-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c