diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2024-06-26 15:48:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-27 17:08:05 +0300 |
commit | fef267a6c29bb2377e344a060c151041bd4de677 (patch) | |
tree | c1bc1f05fe0dcf741218ea94c5ba362a698d1086 /drivers/usb/host | |
parent | e6092feacf3f52b447fa2225453b566f32b998af (diff) | |
download | linux-fef267a6c29bb2377e344a060c151041bd4de677.tar.xz |
xhci: show usb device name in xhci urb tracing
parsing xhci traces on systems with several xHCI controllers and connected
usb devices is difficult as entries are all interleaved.
showing usb devname in urb tracing reveals both which device, and which
bus/controller the entry is for.
old:
xhci_urb_enqueue: ep2in-bulk: urb 0000000039224498 ...
new:
xhci_urb_enqueue: 3-9.4 ep1in-bulk: urb 0000000013bf21e7 ...
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240626124835.1023046-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-trace.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h index 5762564b9d73..24405315ffe6 100644 --- a/drivers/usb/host/xhci-trace.h +++ b/drivers/usb/host/xhci-trace.h @@ -250,6 +250,7 @@ DECLARE_EVENT_CLASS(xhci_log_urb, TP_PROTO(struct urb *urb), TP_ARGS(urb), TP_STRUCT__entry( + __string(devname, dev_name(&urb->dev->dev)) __field(void *, urb) __field(unsigned int, pipe) __field(unsigned int, stream) @@ -265,6 +266,7 @@ DECLARE_EVENT_CLASS(xhci_log_urb, __field(int, slot_id) ), TP_fast_assign( + __assign_str(devname); __entry->urb = urb; __entry->pipe = urb->pipe; __entry->stream = urb->stream_id; @@ -279,7 +281,8 @@ DECLARE_EVENT_CLASS(xhci_log_urb, __entry->type = usb_endpoint_type(&urb->ep->desc); __entry->slot_id = urb->dev->slot_id; ), - TP_printk("ep%d%s-%s: urb %p pipe %u slot %d length %d/%d sgs %d/%d stream %d flags %08x", + TP_printk("%s ep%d%s-%s: urb %p pipe %u slot %d length %d/%d sgs %d/%d stream %d flags %08x", + __get_str(devname), __entry->epnum, __entry->dir_in ? "in" : "out", __print_symbolic(__entry->type, { USB_ENDPOINT_XFER_INT, "intr" }, |