blob: 0687b96ebb272c6857d71fe67ef9aea495b88c4c [file] [log] [blame]
From 3dd8f8c52ec822e55cd7f0b4fdb19420c2a43976 Mon Sep 17 00:00:00 2001
From: Mathias Nyman <mathias.nyman@linux.intel.com>
Date: Fri, 8 Dec 2017 17:59:15 +0200
Subject: [PATCH 0532/1795] xhci: add port status tracing for Get Hub Status
requests
Trace the port status of each port of a roothub when
the xhci roothub receives a Get Hub Status request.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3f8499ac7cd838199eacd9d9a002e37227f1f2c7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/usb/host/xhci-hub.c | 2 ++
drivers/usb/host/xhci-trace.h | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index cb725a2c9529..b66440501d0c 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1443,6 +1443,8 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
retval = -ENODEV;
break;
}
+ trace_xhci_hub_status_data(i, temp);
+
if ((temp & mask) != 0 ||
(bus_state->port_c_suspend & 1 << i) ||
(bus_state->resume_done[i] && time_after_eq(
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index 3d5b6bde9168..88b427434bd8 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -525,6 +525,11 @@ DEFINE_EVENT(xhci_log_portsc, xhci_get_port_status,
TP_ARGS(portnum, portsc)
);
+DEFINE_EVENT(xhci_log_portsc, xhci_hub_status_data,
+ 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),
--
2.19.0