diff options
author | Niklas Neronin <niklas.neronin@intel.com> | 2024-02-29 16:14:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-02 20:25:27 +0100 |
commit | c9a63ec5d2590793d0da267e9300401c86306df8 (patch) | |
tree | ff66da82a4cdd11c4b078148ba742ac8adfa501f /drivers/usb/host/xhci.h | |
parent | c40b51b3f365f6bc903719acc4fac7eed8a56639 (diff) | |
download | linux-stable-c9a63ec5d2590793d0da267e9300401c86306df8.tar.gz linux-stable-c9a63ec5d2590793d0da267e9300401c86306df8.tar.bz2 linux-stable-c9a63ec5d2590793d0da267e9300401c86306df8.zip |
xhci: rework how real & fake ports are found
xHC hardware needs to know which roothub port a USB device is attached to
when controlling the device, so the xHCI driver stores in each device the
roothub port which it's connected behind. This is done with two different
port index values, the 'real_port' which is an index to the xHC hardware
port register array, and the 'fake_port' which is the per hub port index
used by the hub driver.
Instead of finding real & fake port separately, find the root hub port
'xhci_port' structure which contains both real & fake port values:
- 'real_port' is ('hw_portnum' + 1)
- 'fake_port' is ('hcd_portnum' + 1)
i.e. real & fake port are 'hw_portnum' & 'hcd_portnum' in one-based
format.
The 'xhci_port' structure is a better way to refer to roothub ports than
the 'real_port' & 'fake_port'. As a result, these port indexes are slated
to be replaced with a direct pointer to the root hub port. This patch
setups the ground work for the future changes.
Signed-off-by: Niklas Neronin <niklas.neronin@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240229141438.619372-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.h')
0 files changed, 0 insertions, 0 deletions