aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/host/xhci-trace.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-08-16 14:23:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-16 15:26:26 -0700
commit8ca1358bd9b1c7a98c8f3210c1aaa2577975a389 (patch)
tree1804f3a6ed0176bf76b1bd11a822e84f88b53ea0 /drivers/usb/host/xhci-trace.h
parentxhci: rename temp and temp1 variables (diff)
downloadwireguard-linux-8ca1358bd9b1c7a98c8f3210c1aaa2577975a389.tar.xz
wireguard-linux-8ca1358bd9b1c7a98c8f3210c1aaa2577975a389.zip
xhci: add port status tracing
Track the port status in a human readble way each time we get a port status change event Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-trace.h')
-rw-r--r--drivers/usb/host/xhci-trace.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index 8ce96de10e8a..f20753b99624 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -453,6 +453,29 @@ DEFINE_EVENT(xhci_log_ring, xhci_inc_deq,
TP_PROTO(struct xhci_ring *ring),
TP_ARGS(ring)
);
+
+DECLARE_EVENT_CLASS(xhci_log_portsc,
+ TP_PROTO(u32 portnum, u32 portsc),
+ TP_ARGS(portnum, portsc),
+ TP_STRUCT__entry(
+ __field(u32, portnum)
+ __field(u32, portsc)
+ ),
+ TP_fast_assign(
+ __entry->portnum = portnum;
+ __entry->portsc = portsc;
+ ),
+ TP_printk("port-%d: %s",
+ __entry->portnum,
+ xhci_decode_portsc(__entry->portsc)
+ )
+);
+
+DEFINE_EVENT(xhci_log_portsc, xhci_handle_port_status,
+ TP_PROTO(u32 portnum, u32 portsc),
+ TP_ARGS(portnum, portsc)
+);
+
#endif /* __XHCI_TRACE_H */
/* this part must be outside header guard */