]> www.infradead.org Git - users/hch/misc.git/commitdiff
usb: xhci: align PORTSC trace with one-based port numbering
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Wed, 17 Sep 2025 21:07:25 +0000 (00:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Sep 2025 07:53:11 +0000 (09:53 +0200)
In the xHCI driver, port numbers are typically described using a one-based
index. However, tracing currently uses a zero-based index. To ensure
consistency between tracing and dynamic debugging, update the trace port
number to use a one-based index.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250917210726.97100-7-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-trace.h

index f303ce600ff5b39585facc3e015e7d5a5be5f58c..9abc904f174956d52f75501bb145debab881b1d6 100644 (file)
@@ -550,7 +550,7 @@ DECLARE_EVENT_CLASS(xhci_log_portsc,
        ),
        TP_fast_assign(
                __entry->busnum = port->rhub->hcd->self.busnum;
-               __entry->portnum = port->hcd_portnum;
+               __entry->portnum = port->hcd_portnum + 1;
                __entry->portsc = portsc;
        ),
        TP_printk("port %d-%d: %s",