Skip to content

usb: xhci: Port Register Set improvements

Niklas Neronin linux-usb llvm oe-kbuild-all 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyIn review
  2. v17 patches 5 repliesSuperseded

Changes in v2 from the cover letter

* Fix acronym spelling to PORTSC from PORTCS, in all commit messages.
* Add patch introducing xhci_get_portsc().

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8usb: xhci: correct indentation for PORTSC tracing functiondrivers/usb/host/xhci-trace.h+17 -170 replies
2/8usb: xhci: align PORTSC trace with one-based port numberingdrivers/usb/host/xhci-trace.h+1 -11 reply
3/8usb: xhci: improve xhci_decode_portsc()drivers/usb/host/xhci.h+29 -230 replies
4/8usb: xhci: add tracing for PORTSC register writesdrivers/usb/host/xhci-debugfs.c drivers/usb/host/xhci-hub.c drivers/usb/host/xhci-pci.c +3 more+31 -200 replies
5/8usb: xhci: add PORTSC read functiondrivers/usb/host/xhci-debugfs.c drivers/usb/host/xhci-hub.c drivers/usb/host/xhci-pci.c +4 more+54 -480 replies
6/8usb: xhci: add USB Port Register Set structdrivers/usb/host/xhci-mem.c drivers/usb/host/xhci.h+17 -220 replies
7/8usb: xhci: implement USB Port Register Set structdrivers/usb/host/xhci-hub.c drivers/usb/host/xhci-mem.c drivers/usb/host/xhci.c +1 more+24 -300 replies
8/8usb: xhci: rename Port Register Set pointer in struct 'xhci_port'drivers/usb/host/xhci-hub.c drivers/usb/host/xhci-mem.c drivers/usb/host/xhci.c +1 more+24 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/8] usb: xhci: Port Register Set improvements

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.

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.

v2 changes:
* Fix acronym spelling to PORTSC from PORTCS, in all commit messages.
* Add patch introducing xhci_get_portsc().

Niklas Neronin (8):
usb: xhci: correct indentation for PORTSC tracing function
usb: xhci: align PORTSC trace with one-based port numbering
usb: xhci: improve xhci_decode_portsc()
usb: xhci: add tracing for PORTSC register writes
usb: xhci: add PORTSC read function
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         |  46 ++++++++-----
 drivers/usb/host/xhci.h         |  95 +++++++++++++-------------
 9 files changed, 167 insertions(+), 155 deletions(-)
Signature · 1 line
2.50.1