From: Niklas Neronin <niklas.neronin@linux.intel.com>
To: mathias.nyman@linux.intel.com
Cc: linux-usb@vger.kernel.org, peter.chen@kernel.org,
Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: [PATCH v2 2/8] usb: xhci: align PORTSC trace with one-based port numbering
Date: Wed, 17 Sep 2025 14:58:43 +0200 [thread overview]
Message-ID: <20250917125850.3380560-3-niklas.neronin@linux.intel.com> (raw)
In-Reply-To: <20250917125850.3380560-1-niklas.neronin@linux.intel.com>
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>
---
drivers/usb/host/xhci-trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index f303ce600ff5..9abc904f1749 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -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",
--
2.50.1
next prev parent reply other threads:[~2025-09-17 12:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 12:58 [PATCH v2 0/8] usb: xhci: Port Register Set improvements Niklas Neronin
2025-09-17 12:58 ` [PATCH v2 1/8] usb: xhci: correct indentation for PORTSC tracing function Niklas Neronin
2025-09-17 12:58 ` Niklas Neronin [this message]
2025-09-17 21:14 ` [PATCH v2 2/8] usb: xhci: align PORTSC trace with one-based port numbering Mathias Nyman
2025-09-17 12:58 ` [PATCH v2 3/8] usb: xhci: improve xhci_decode_portsc() Niklas Neronin
2025-09-17 12:58 ` [PATCH v2 4/8] usb: xhci: add tracing for PORTSC register writes Niklas Neronin
2025-09-19 11:54 ` kernel test robot
2025-09-17 12:58 ` [PATCH v2 5/8] usb: xhci: add PORTSC read function Niklas Neronin
2025-09-20 16:19 ` kernel test robot
2025-09-17 12:58 ` [PATCH v2 6/8] usb: xhci: add USB Port Register Set struct Niklas Neronin
2025-09-17 12:58 ` [PATCH v2 7/8] usb: xhci: implement " Niklas Neronin
2025-09-17 12:58 ` [PATCH v2 8/8] usb: xhci: rename Port Register Set pointer in struct 'xhci_port' Niklas Neronin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250917125850.3380560-3-niklas.neronin@linux.intel.com \
--to=niklas.neronin@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=peter.chen@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox