summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorFelipe Balbi2017-01-23 13:20:20 +0100
committerGreg Kroah-Hartman2017-01-25 11:00:01 +0100
commit5abdc2e6e12ff040a218dc807be4c4d9866b265f (patch)
tree7dbdfb537589305248bc348c6d3f2c88c59de7ee /drivers/usb/host/xhci.c
parentusb: host: xhci: make a generic TRB tracer (diff)
downloadkernel-qcow2-linux-5abdc2e6e12ff040a218dc807be4c4d9866b265f.tar.gz
kernel-qcow2-linux-5abdc2e6e12ff040a218dc807be4c4d9866b265f.tar.xz
kernel-qcow2-linux-5abdc2e6e12ff040a218dc807be4c4d9866b265f.zip
usb: host: xhci: add urb_enqueue/dequeue/giveback tracers
These three new tracers will help us tie TRBs into URBs by *also* looking into URB lifetime. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> 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.c')
-rw-r--r--drivers/usb/host/xhci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 5d6b5a27460a..958c92bd9177 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1383,6 +1383,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
urb_priv->td_cnt = 0;
urb->hcpriv = urb_priv;
+ trace_xhci_urb_enqueue(urb);
+
if (usb_endpoint_xfer_control(&urb->ep->desc)) {
/* Check to see if the max packet size for the default control
* endpoint changed during FS device enumeration
@@ -1509,6 +1511,9 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
xhci = hcd_to_xhci(hcd);
spin_lock_irqsave(&xhci->lock, flags);
+
+ trace_xhci_urb_dequeue(urb);
+
/* Make sure the URB hasn't completed or been unlinked already */
ret = usb_hcd_check_unlink_urb(hcd, urb, status);
if (ret || !urb->hcpriv)