Linux USB
 help / color / mirror / Atom feed
* [PATCH 00/22] usb: xhci: rework xHCI Port macros
@ 2026-07-13 10:47 Niklas Neronin
  2026-07-13 10:47 ` [PATCH 01/22] usb: xhci: replace bit shifts with the BIT() macro in xhci-port.h Niklas Neronin
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Niklas Neronin @ 2026-07-13 10:47 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-usb, Niklas Neronin

Rework xhci-port.h to standardize how USB Port register macros are
defined and used.

Field macros are restricted to describing bit masks only, while the common
FIELD_* helpers are used to extract, set, and update field values.
This removes custom helpers and consolidates bitfield handling into a
single, well-established mechanism.

Other changes include:
- Renaming macros to follow the xHCI specification.
- Relocating USB Port macros to xhci-port.h
- Updating bit field comments and format.
- Adding missing bit/macros.

Why are there 22 patches when many make similar changes?
  The series is intentionally split to make review easier by keeping each
  patch focused and manageable. If preferred, the patches can be combined
  after review without issues.

Niklas Neronin (22):
  usb: xhci: replace bit shifts with the BIT() macro in xhci-port.h
  usb: xhci: rework Port Speed macros
  usb: xhci: rework Port Link State macros
  usb: xhci: rework Port Indicator Control macro
  usb: xhci: rework USB3 PORTPMSC macros
  usb: xhci: rework USB2 PORTPMSC macros
  usb: xhci: rework USB3 PORTLI macros
  usb: xhci: rework USB2 PORTLI macros
  usb: xhci: rework USB3 PORTHLPMC macros
  usb: xhci: rework USB2 PORTHLPMC macros
  usb: xhci: update port register bitfield comments for consistency
  usb: xhci: rename port register macros to xHCI spec abbreviations
  usb: xhci: replace magic numbers with Port macros
  usb: xhci: update PORTSC aggregate macros
  usb: xhci: consolidate PORTSC RW1CS bit macros
  usb: xhci: relocate all port register macros to xhci-port.h
  usb: xhci: preserve RW bits in xhci_port_state_to_neutral()
  usb: xhci: improve xhci_port_missing_cas_quirk()
  usb: xhci: use neutral helper when resuming ports
  usb: xhci: remove redundant PORTSC ops in xhci_hub_control()
  usb: xhci: move struct 'xhci_port' specific macro
  usb: xhci: rename 'temp' PORTSC variables to 'portcs'

 drivers/usb/dwc3/host.c         |   2 +-
 drivers/usb/early/xhci-dbc.c    |   4 +-
 drivers/usb/host/xhci-debugfs.c |  24 ++-
 drivers/usb/host/xhci-hub.c     | 360 ++++++++++++++------------------
 drivers/usb/host/xhci-pci.c     |   4 +-
 drivers/usb/host/xhci-port.h    | 302 +++++++++++++++------------
 drivers/usb/host/xhci-ring.c    |  23 +-
 drivers/usb/host/xhci-tegra.c   |  24 ++-
 drivers/usb/host/xhci.c         |  35 ++--
 drivers/usb/host/xhci.h         |  68 +++---
 10 files changed, 430 insertions(+), 416 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2026-07-13 10:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 10:47 [PATCH 00/22] usb: xhci: rework xHCI Port macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 01/22] usb: xhci: replace bit shifts with the BIT() macro in xhci-port.h Niklas Neronin
2026-07-13 10:47 ` [PATCH 02/22] usb: xhci: rework Port Speed macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 03/22] usb: xhci: rework Port Link State macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 04/22] usb: xhci: rework Port Indicator Control macro Niklas Neronin
2026-07-13 10:47 ` [PATCH 05/22] usb: xhci: rework USB3 PORTPMSC macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 06/22] usb: xhci: rework USB2 " Niklas Neronin
2026-07-13 10:47 ` [PATCH 07/22] usb: xhci: rework USB3 PORTLI macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 08/22] usb: xhci: rework USB2 " Niklas Neronin
2026-07-13 10:47 ` [PATCH 09/22] usb: xhci: rework USB3 PORTHLPMC macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 10/22] usb: xhci: rework USB2 " Niklas Neronin
2026-07-13 10:47 ` [PATCH 11/22] usb: xhci: update port register bitfield comments for consistency Niklas Neronin
2026-07-13 10:47 ` [PATCH 12/22] usb: xhci: rename port register macros to xHCI spec abbreviations Niklas Neronin
2026-07-13 10:47 ` [PATCH 13/22] usb: xhci: replace magic numbers with Port macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 14/22] usb: xhci: update PORTSC aggregate macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 15/22] usb: xhci: consolidate PORTSC RW1CS bit macros Niklas Neronin
2026-07-13 10:47 ` [PATCH 16/22] usb: xhci: relocate all port register macros to xhci-port.h Niklas Neronin
2026-07-13 10:47 ` [PATCH 17/22] usb: xhci: preserve RW bits in xhci_port_state_to_neutral() Niklas Neronin
2026-07-13 10:47 ` [PATCH 18/22] usb: xhci: improve xhci_port_missing_cas_quirk() Niklas Neronin
2026-07-13 10:47 ` [PATCH 19/22] usb: xhci: use neutral helper when resuming ports Niklas Neronin
2026-07-13 10:47 ` [PATCH 20/22] usb: xhci: remove redundant PORTSC ops in xhci_hub_control() Niklas Neronin
2026-07-13 10:47 ` [PATCH 21/22] usb: xhci: move struct 'xhci_port' specific macro Niklas Neronin
2026-07-13 10:47 ` [PATCH 22/22] usb: xhci: rename 'temp' PORTSC variables to 'portcs' Niklas Neronin

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