Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/7] usb: xhci: Port Register Set improvements
@ 2025-09-04 15:42 Niklas Neronin
  2025-09-04 15:42 ` [PATCH 1/7] usb: xhci: correct indentation for PORTCS tracing function Niklas Neronin
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Niklas Neronin @ 2025-09-04 15:42 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-usb, Niklas Neronin

The aim of this patch set is to introduce tracing for PORTCS writes and 
implement a Port Register Set struct.

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.

Note:
I have chosen to split the struct changes across three separate commits
due to the substantial number of modified lines. Personally, I find that
minor typos are more likely to occur when dealing with larger patches.
However, I am open to consolidating these patches into a single commit
after review.

Niklas Neronin (7):
  usb: xhci: correct indentation for PORTCS tracing function
  usb: xhci: align PORTCS trace with one-based port numbering
  usb: xhci: improve xhci_decode_portsc()
  usb: xhci: add tracing for PORTCS register writes
  usb: xhci: add USB Port Register Set struct
  usb: xhci: implement USB Port Register Set struct
  usb: xhci: rename Port Register Set pointer in struct 'xhci_port'

 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   |  39 ++++++-----
 drivers/usb/host/xhci.c         |  41 +++++++-----
 drivers/usb/host/xhci.h         |  94 +++++++++++++-------------
 9 files changed, 161 insertions(+), 155 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-09-12  0:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 15:42 [PATCH 0/7] usb: xhci: Port Register Set improvements Niklas Neronin
2025-09-04 15:42 ` [PATCH 1/7] usb: xhci: correct indentation for PORTCS tracing function Niklas Neronin
2025-09-04 15:42 ` [PATCH 2/7] usb: xhci: align PORTCS trace with one-based port numbering Niklas Neronin
2025-09-04 15:42 ` [PATCH 3/7] usb: xhci: improve xhci_decode_portsc() Niklas Neronin
2025-09-04 15:42 ` [PATCH 4/7] usb: xhci: add tracing for PORTCS register writes Niklas Neronin
2025-09-04 15:42 ` [PATCH 5/7] usb: xhci: add USB Port Register Set struct Niklas Neronin
2025-09-04 15:42 ` [PATCH 6/7] usb: xhci: implement " Niklas Neronin
2025-09-04 15:42 ` [PATCH 7/7] usb: xhci: rename Port Register Set pointer in struct 'xhci_port' Niklas Neronin
2025-09-05  2:40   ` Peter Chen (CIX)
2025-09-10  7:24     ` Neronin, Niklas
2025-09-12  0:48       ` Peter Chen (CIX)
2025-09-05  1:57 ` [PATCH 0/7] usb: xhci: Port Register Set improvements Peter Chen (CIX)
2025-09-10  7:12   ` Neronin, Niklas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox