]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xhci: add helper to stop endpoint and wait for completion
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 15 Oct 2024 21:28:44 +0000 (14:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 06:43:25 +0000 (08:43 +0200)
commit07b887f8236eb3ed52f1fe83e385e6436dc4b052
treeca9c27c6dca93a01732f1cf2954eca9b2967602c
parente723ebc3a9aa172ab8042382afcae310c953104d
xhci: add helper to stop endpoint and wait for completion

Expose xhci_stop_endpoint_sync() which is a synchronous variant of
xhci_queue_stop_endpoint().  This is useful for client drivers that are
using the secondary interrupters, and need to stop the current endpoint
session.

This does not go through the normal xhci_handle_cmd_stop_ep() command
completion handler, because it utilizes the completion path to achieve
synchronous behavior.  Users of this API are primarily intended to be
clients that maintain their own transfer rings, such as in the case of USB
audio offload.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20241015212915.1206789-3-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h