From: Niklas Neronin <niklas.neronin@linux.intel.com>
To: mathias.nyman@linux.intel.com
Cc: linux-usb@vger.kernel.org,
Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: [PATCH 0/9] usb: xhci: rework USB request parameter handling
Date: Thu, 19 Mar 2026 14:56:15 +0100 [thread overview]
Message-ID: <20260319135626.3077643-1-niklas.neronin@linux.intel.com> (raw)
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
next reply other threads:[~2026-03-19 13:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 13:56 Niklas Neronin [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260319135626.3077643-1-niklas.neronin@linux.intel.com \
--to=niklas.neronin@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox