From: Niklas Neronin <niklas.neronin@linux.intel.com>
To: mathias.nyman@linux.intel.com
Cc: linux-usb@vger.kernel.org,
Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: [PATCH v3 0/5] usb: xhci: add Port Register struct and tracing
Date: Tue, 28 Oct 2025 15:12:37 +0100 [thread overview]
Message-ID: <20251028141244.2909808-1-niklas.neronin@linux.intel.com> (raw)
The aim of this patch set is to introduce tracing for PORTSC writes and
implement a Port Register Set struct. This is the first part in a larger
series of changes.
Introduces a new struct for the Host Controller USB Port Register Set.
The current implementation accesses these registers through a single
'__le32' pointer, which, in conjunction with a macro, navigates to the
specific register using (base address + offset).
Currently, how its accessed | Register Name
--------------------------------------------------------------------------
port->addr | Port Status and Control
port->addr + PORTPMSC | Port Power Management Status and Control
port->addr + PORTLI | Port Link Info
port->addr + PORTHLPMC | Port Hardware LPM Control
After, how its accessed | Register Name
--------------------------------------------------------------------------
port->port_reg->portsc | Port Status and Control
port->port_reg->portpmsc | Port Power Management Status and Control
port->port_reg->portli | Port Link Info
port->port_reg->porthlmpc | Port Hardware LPM Control
These changes make it easier for future modification and their review.
v3 changes:
* Rebased on top of 6.18-rc1.
* Further simplified and generalized xhci_decode_portsc().
* Changed PORTSC read/write functions names.
* Added EXPORT_SYMBOL_GPL() to PORTSC read/write.
* Folded rename patch into Port Register struct implementation patch.
v2 changes:
* Fix acronym spelling to PORTSC from PORTCS, in all commit messages.
* Add patch introducing xhci_get_portsc().
Niklas Neronin (5):
usb: xhci: rework xhci_decode_portsc()
usb: xhci: add tracing for PORTSC register writes
usb: xhci: add helper to read PORTSC register
usb: xhci: add USB Port Register Set struct
usb: xhci: implement USB Port Register Set struct
drivers/usb/host/xhci-debugfs.c | 6 +-
drivers/usb/host/xhci-hub.c | 115 ++++++++++++++++----------------
drivers/usb/host/xhci-mem.c | 3 +-
drivers/usb/host/xhci-pci.c | 4 +-
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/host/xhci-tegra.c | 12 ++--
drivers/usb/host/xhci-trace.h | 5 ++
drivers/usb/host/xhci.c | 48 ++++++++-----
drivers/usb/host/xhci.h | 102 +++++++++++++++-------------
9 files changed, 159 insertions(+), 138 deletions(-)
--
2.50.1
next reply other threads:[~2025-10-28 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 14:12 Niklas Neronin [this message]
2025-10-28 14:12 ` [PATCH v3 1/5] usb: xhci: rework xhci_decode_portsc() Niklas Neronin
2025-10-28 14:12 ` [PATCH v3 2/5] usb: xhci: add tracing for PORTSC register writes Niklas Neronin
2025-10-28 14:12 ` [PATCH v3 3/5] usb: xhci: add helper to read PORTSC register Niklas Neronin
2025-10-31 3:08 ` Peter Chen (CIX)
2025-10-28 14:12 ` [PATCH v3 4/5] usb: xhci: add USB Port Register Set struct Niklas Neronin
2025-10-28 14:12 ` [PATCH v3 5/5] usb: xhci: implement " 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=20251028141244.2909808-1-niklas.neronin@linux.intel.com \
--to=niklas.neronin@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
/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