usb: xhci: rework USB request parameter handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | usb: xhci: stop treating 'wIndex' as a mutable port numberdrivers/ | +30 | 1 reply | |
| 2/9 | usb: xhci: rename 'wIndex' parameters to 'portnum'drivers/ | +27 | 0 replies | |
| 3/9 | usb: xhci: clean up handling of upper bits in SetPortFeature wIndexdrivers/ | +12 | 0 replies | |
| 4/9 | usb: xhci: clean up 'wValue' handling in xhci_hub_control()drivers/ | +6 | 0 replies | |
| 5/9 | usb: xhci: separate use of USB Chapter 11 PLS macros from xHCI-specific PLS macrosdrivers/ | +7 | 0 replies | |
| 6/9 | usb: xhci: add PORTPMSC variable to xhci_hub_control()drivers/ | +9 | 0 replies | |
| 7/9 | usb: xhci: add PORTSC variable to xhci_hub_control()drivers/ | +51 | 0 replies | |
| 8/9 | usb: xhci: rename parameter to match argument 'portsc'drivers/ | +30 | 0 replies | |
| 9/9 | usb: xhci: cleanup xhci_hub_report_usb3_link_state()drivers/ | +21 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] usb: xhci: rework USB request parameter handling
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(-)
Signature · 1 line
2.50.1