public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] usb: xhci: rework USB request parameter handling
@ 2026-03-19 13:56 Niklas Neronin
  2026-03-19 13:56 ` [PATCH 1/9] usb: xhci: stop treating 'wIndex' as a mutable port number Niklas Neronin
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Niklas Neronin @ 2026-03-19 13:56 UTC (permalink / raw)
  To: mathias.nyman; +Cc: linux-usb, Niklas Neronin

Clean up how xhci_hub_control() handles USB hub-class request parameters.
The function receives the raw USB request fields (wValue, wIndex, wLength),
which must be decoded differently depending on the request type. Many of
the decoded values also have direct equivalents inside the xhci driver,
but the code mixes the USB-level representations with the internal xhci
ones.

Standardize the handling by decoding USB request parameters up front and
converting them into the xhci driver's expected internal forms.
Additionally, ensure that the correct macro set is used for the correct
source.

This results in clearer logic, fewer assumptions, and a reduced risk of
mixing USB Chapter 11 values with xhci-specific encodings.

Niklas Neronin (9):
  usb: xhci: stop treating 'wIndex' as a mutable port number
  usb: xhci: rename 'wIndex' parameters to 'portnum'
  usb: xhci: clean up handling of upper bits in SetPortFeature wIndex
  usb: xhci: clean up 'wValue' handling in xhci_hub_control()
  usb: xhci: separate use of USB Chapter 11 PLS macros from
    xHCI-specific PLS macros
  usb: xhci: add PORTPMSC variable to xhci_hub_control()
  usb: xhci: add PORTSC variable to xhci_hub_control()
  usb: xhci: rename parameter to match argument 'portsc'
  usb: xhci: cleanup xhci_hub_report_usb3_link_state()

 drivers/usb/host/xhci-hub.c | 383 +++++++++++++++++-------------------
 1 file changed, 178 insertions(+), 205 deletions(-)

-- 
2.50.1


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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 13:56 [PATCH 0/9] usb: xhci: rework USB request parameter handling Niklas Neronin
2026-03-19 13:56 ` [PATCH 1/9] usb: xhci: stop treating 'wIndex' as a mutable port number Niklas Neronin
2026-03-19 14:10   ` Oliver Neukum
2026-03-19 13:56 ` [PATCH 2/9] usb: xhci: rename 'wIndex' parameters to 'portnum' Niklas Neronin
2026-03-19 13:56 ` [PATCH 3/9] usb: xhci: clean up handling of upper bits in SetPortFeature wIndex Niklas Neronin
2026-03-19 13:56 ` [PATCH 4/9] usb: xhci: clean up 'wValue' handling in xhci_hub_control() Niklas Neronin
2026-03-19 13:56 ` [PATCH 5/9] usb: xhci: separate use of USB Chapter 11 PLS macros from xHCI-specific PLS macros Niklas Neronin
2026-03-19 13:56 ` [PATCH 6/9] usb: xhci: add PORTPMSC variable to xhci_hub_control() Niklas Neronin
2026-03-19 13:56 ` [PATCH 7/9] usb: xhci: add PORTSC " Niklas Neronin
2026-03-19 13:56 ` [PATCH 8/9] usb: xhci: rename parameter to match argument 'portsc' Niklas Neronin
2026-03-19 13:56 ` [PATCH 9/9] usb: xhci: cleanup xhci_hub_report_usb3_link_state() Niklas Neronin

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