Linux USB
 help / color / mirror / Atom feed
* [PATCH v3 00/12] usb: xhci: rework xHCI Port macros
@ 2026-12-03 14:42 Niklas Neronin
  2026-12-03 14:42 ` [PATCH v3 01/12] usb: xhci: use BIT() for single bit port register flags Niklas Neronin
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Niklas Neronin @ 2026-12-03 14:42 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-usb, Niklas Neronin

This series cleans up the xHCI port register macros in xhci-port.h:
PORTSC, PORTPMSC, PORTLI and PORTHLPMC.

Many fields are defined as pre-shifted values, together with helper
macros that mask, shift and compare them. This series defines each
field with GENMASK()/BIT(), uses plain field values, and accesses the
fields with FIELD_GET(), FIELD_PREP() and FIELD_MODIFY(). Register
comments are aligned with the xHCI specification, and the PORTSC
field macros are renamed to the spec abbreviations.

This is part 1 of the port register cleanup.

v3 changes:
 * Dropped the second half of the original patch series. The remaining
   patches are relatively small reworks. The second half will be
   submitted separately.
 * Updated all commit messages.

Niklas Neronin (12):
  usb: xhci: use BIT() for single bit port register flags
  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: document USB3 PORTHLPMC register layout
  usb: xhci: rework USB2 PORTHLPMC macros
  usb: xhci: update port register bitfield comments for consistency
  usb: xhci: rename PORTSC field macros to xHCI spec abbreviations

 drivers/usb/dwc3/host.c         |   2 +-
 drivers/usb/early/xhci-dbc.c    |   4 +-
 drivers/usb/host/xhci-debugfs.c |  23 +--
 drivers/usb/host/xhci-hub.c     | 225 ++++++++++++------------
 drivers/usb/host/xhci-pci.c     |   4 +-
 drivers/usb/host/xhci-port.h    | 293 ++++++++++++++++++--------------
 drivers/usb/host/xhci-ring.c    |  25 ++-
 drivers/usb/host/xhci-tegra.c   |  23 +--
 drivers/usb/host/xhci.c         |  24 +--
 drivers/usb/host/xhci.h         |  65 ++++---
 10 files changed, 370 insertions(+), 318 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2026-12-03 14:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 14:42 [PATCH v3 00/12] usb: xhci: rework xHCI Port macros Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 01/12] usb: xhci: use BIT() for single bit port register flags Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 02/12] usb: xhci: rework Port Speed macros Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 03/12] usb: xhci: rework Port Link State macros Niklas Neronin
2026-12-03 14:59   ` sashiko-bot
2026-12-03 14:42 ` [PATCH v3 04/12] usb: xhci: rework Port Indicator Control macro Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 05/12] usb: xhci: rework USB3 PORTPMSC macros Niklas Neronin
2026-12-03 14:50   ` sashiko-bot
2026-12-03 14:42 ` [PATCH v3 06/12] usb: xhci: rework USB2 " Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 07/12] usb: xhci: rework USB3 PORTLI macros Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 08/12] usb: xhci: rework USB2 " Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 09/12] usb: xhci: document USB3 PORTHLPMC register layout Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 10/12] usb: xhci: rework USB2 PORTHLPMC macros Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 11/12] usb: xhci: update port register bitfield comments for consistency Niklas Neronin
2026-12-03 14:42 ` [PATCH v3 12/12] usb: xhci: rename PORTSC field macros to xHCI spec abbreviations Niklas Neronin
2026-12-03 14:54   ` sashiko-bot
2026-12-03 14:59 ` [PATCH v3 00/12] usb: xhci: rework xHCI Port macros sashiko-bot

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