summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGuan-Yu Lin <guanyulin@google.com>2025-09-11 17:20:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-12 15:08:02 +0300
commitef82a4803aabaf623bfcae07981406f1386eabf9 (patch)
tree2771bdc3efd0f2e5aa7fbc2e47dc2aba0d8b593f /include/linux
parent7f70b89b2be66c03ddc76d3ad8aebeeec4a9c505 (diff)
downloadlinux-ef82a4803aabaf623bfcae07981406f1386eabf9.tar.xz
xhci: sideband: add api to trace sideband usage
The existing sideband driver only registers sidebands without tracking their active usage. To address this, sideband will now record its active usage when it creates/removes interrupters. In addition, a new api is introduced to provide a means for other dirvers to fetch sideband activity information on a USB host controller. Signed-off-by: Guan-Yu Lin <guanyulin@google.com> Link: https://lore.kernel.org/r/20250911142051.90822-4-guanyulin@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250911142051.90822-4-guanyulin@google.com
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/xhci-sideband.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/usb/xhci-sideband.h b/include/linux/usb/xhci-sideband.h
index 45288c392f6e..005257085dcb 100644
--- a/include/linux/usb/xhci-sideband.h
+++ b/include/linux/usb/xhci-sideband.h
@@ -11,6 +11,7 @@
#include <linux/scatterlist.h>
#include <linux/usb.h>
+#include <linux/usb/hcd.h>
#define EP_CTX_PER_DEV 31 /* FIXME defined twice, from xhci.h */
@@ -83,6 +84,14 @@ xhci_sideband_get_endpoint_buffer(struct xhci_sideband *sb,
struct usb_host_endpoint *host_ep);
struct sg_table *
xhci_sideband_get_event_buffer(struct xhci_sideband *sb);
+
+#if IS_ENABLED(CONFIG_USB_XHCI_SIDEBAND)
+bool xhci_sideband_check(struct usb_hcd *hcd);
+#else
+static inline bool xhci_sideband_check(struct usb_hcd *hcd)
+{ return false; }
+#endif /* IS_ENABLED(CONFIG_USB_XHCI_SIDEBAND) */
+
int
xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg,
bool ip_autoclear, u32 imod_interval, int intr_num);