]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: xhci: clean up 'wValue' handling in xhci_hub_control()
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Thu, 2 Apr 2026 13:13:33 +0000 (16:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:55:38 +0000 (15:55 +0200)
commit995e2af1656882294cbf86396f74c308806f33dc
tree853acb0764f53db0110a3e001bfdb445bfaf7d35
parentb7a56f8652d00a8c4d94c2214301f6475989339e
usb: xhci: clean up 'wValue' handling in xhci_hub_control()

Several hub control requests encode a descriptor type in the upper byte
of 'wValue'. Clean this up by extracting the descriptor type into a local
variable and using it for all relevant requests.

Replace magic value (0x02) with the appropriate macro (HUB_EXT_PORT_STATUS)

This improves readability and makes the handling of 'wValue' consistent.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260402131342.2628648-17-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c