Skip to content

usb: xhci: Host Controller Capability Registers rework

Niklas Neronin linux-usb 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 1 replyIn review
  2. v113 patches 3 repliesSuperseded

Changes in v2 from the cover letter

* Change xhci_ist_in_microseconds() argument to 'xhci'.
* Rename xhci_ist_in_microseconds() to xhci_ist_microframes().
* Revert to (1 << x) from BIT() operaion in HCC_MAX_PSA() macro.
* Added macro changes to DWC3 driver.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13usb: xhci: remove deprecated TODO commentdrivers/usb/host/xhci.h+0 -10 replies
2/13usb: xhci: remove unused trace operation and argumentdrivers/usb/host/xhci-trace.h drivers/usb/host/xhci.c+8 -210 replies
3/13usb: xhci: use cached HCSPARAMS1 valuedrivers/usb/host/xhci.c+1 -20 replies
4/13usb: xhci: simplify handling of Structural Parameters 1 valuesdrivers/usb/host/xhci-debugfs.c drivers/usb/host/xhci-hub.c drivers/usb/host/xhci-mem.c +4 more+33 -470 replies
5/13usb: xhci: limit number of ports to 127drivers/usb/host/xhci-caps.h drivers/usb/host/xhci.c drivers/usb/host/xhci.h+7 -40 replies
6/13usb: xhci: limit number of interrupts to 128drivers/usb/host/xhci.c drivers/usb/host/xhci.h+12 -80 replies
7/13usb: xhci: improve xhci-caps.h commentsdrivers/usb/host/xhci-caps.h+57 -430 replies
8/13usb: xhci: simplify Isochronous Scheduling Threshold handlingdrivers/usb/host/xhci-caps.h drivers/usb/host/xhci-ring.c+20 -150 replies
9/13usb: xhci: simplify Max Scratchpad buffer macrosdrivers/usb/host/xhci-caps.h+3 -10 replies
10/13usb: xhci: drop xhci-caps.h dependence on xhci-ext-caps.hdrivers/usb/host/xhci-caps.h+2 -20 replies
11/13usb: xhci: standardize single bit-field macrosdrivers/usb/host/xhci-caps.h drivers/usb/host/xhci-debugfs.c drivers/usb/host/xhci-hub.c +4 more+38 -370 replies
12/13usb: xhci: standardize multi bit-field macrosdrivers/usb/dwc3/host.c drivers/usb/host/xhci-caps.h drivers/usb/host/xhci-debugfs.c +9 more+55 -430 replies
13/13usb: xhci: use 64-bit Addressing Capability macrodrivers/usb/host/xhci.c+1 -10 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchSakari Ailus
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13R-b
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] usb: xhci: Host Controller Capability Registers rework

This patch series focuses on improving the definitions and organization of the Host Controller Capability Registers macros in the xhci driver. It is the first step in a larger effort to clean up and restructure the xhci header files for better readability and maintainability.

Because the Structural Parameters 1 register (part of the HC Capability Registers) relies heavily on xhci-caps.h, a few related patches from another ongoing rework have been included here as well. These address the handling of Max Ports and Max Interrupters values.
The Max Slots handling will follow the same pattern in a future series. That change is more involved and will be submitted separately.

v2 changes:
* Change xhci_ist_in_microseconds() argument to 'xhci'.
* Rename xhci_ist_in_microseconds() to xhci_ist_microframes().
* Revert to (1 << x) from BIT() operaion in HCC_MAX_PSA() macro.
* Added macro changes to DWC3 driver.

Niklas Neronin (13):
usb: xhci: remove deprecated TODO comment
usb: xhci: remove unused trace operation and argument
usb: xhci: use cached HCSPARAMS1 value
usb: xhci: simplify handling of Structural Parameters 1 values
usb: xhci: limit number of ports to 127
usb: xhci: limit number of interrupts to 128
usb: xhci: improve xhci-caps.h comments
usb: xhci: simplify Isochronous Scheduling Threshold handling
usb: xhci: simplify Max Scratchpad buffer macros
usb: xhci: drop xhci-caps.h dependence on xhci-ext-caps.h
usb: xhci: standardize single bit-field macros
usb: xhci: standardize multi bit-field macros
usb: xhci: use 64-bit Addressing Capability macro

 drivers/usb/dwc3/host.c         |   5 +-
 drivers/usb/host/xhci-caps.h    | 188 ++++++++++++++++++--------------
 drivers/usb/host/xhci-debugfs.c |  20 ++--
 drivers/usb/host/xhci-histb.c   |   2 +-
 drivers/usb/host/xhci-hub.c     |  12 +-
 drivers/usb/host/xhci-mem.c     |  41 +++----
 drivers/usb/host/xhci-mtk.c     |   4 +-
 drivers/usb/host/xhci-pci.c     |   6 +-
 drivers/usb/host/xhci-plat.c    |   2 +-
 drivers/usb/host/xhci-ring.c    |  40 ++++---
 drivers/usb/host/xhci-tegra.c   |   5 +-
 drivers/usb/host/xhci-trace.h   |  20 +---
 drivers/usb/host/xhci.c         |  57 +++++-----
 drivers/usb/host/xhci.h         |  16 ++-
 14 files changed, 215 insertions(+), 203 deletions(-)
Signature · 1 line
2.50.1