Skip to contentSkip to conversation

xhci: add port status tracing for Get Port Status hub requests

PATCH New Mathias Nyman 1 participant 1 message Dec 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 13/14 xhci: add port status tracing for Get Port Status hub requests

Add tracing showing the port status register content each time the xhci roothub receives a Get Port Status request.

---
 drivers/usb/host/xhci-hub.c   | 1 +
 drivers/usb/host/xhci-trace.h | 5 +++++
 2 files changed, 6 insertions(+)
drivers/usb/host/xhci-hub.c +1 -0
index 64e1b9b..1a1856b 100644
@@ -1076,6 +1076,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
 			retval = -ENODEV;
 			break;
 		}
+		trace_xhci_get_port_status(wIndex, temp);
 		status = xhci_get_port_status(hcd, bus_state, port_array,
 				wIndex, temp, flags);
 		if (status == 0xffffffff)
drivers/usb/host/xhci-trace.h +5 -0
index 67ff314..6c093db 100644
@@ -494,6 +494,11 @@ DEFINE_EVENT(xhci_log_portsc, xhci_handle_port_status,
 	     TP_ARGS(portnum, portsc)
 );
 
+DEFINE_EVENT(xhci_log_portsc, xhci_get_port_status,
+	     TP_PROTO(u32 portnum, u32 portsc),
+	     TP_ARGS(portnum, portsc)
+);
+
 DECLARE_EVENT_CLASS(xhci_dbc_log_request,
 	TP_PROTO(struct dbc_request *req),
 	TP_ARGS(req),