]> git.baikalelectronics.ru Git - kernel.git/commit
usb: xhci: Rewrite xhci_create_usb3_bos_desc()
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 11 Mar 2021 03:43:28 +0000 (19:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Mar 2021 15:52:35 +0000 (16:52 +0100)
commitfeaaf7d59f3e3739d2b998ab567e7232d8514742
tree1bdebd43507e5e8e8ad0cf7712f2c7c2fb6e4a7e
parent50b45ee06f4b9f14e0cf6f06475c06a7c13d3b99
usb: xhci: Rewrite xhci_create_usb3_bos_desc()

The current xhci_create_usb3_bos_desc() uses a static bos u8 array and
various magic numbers and offsets making it difficult to extend support
for USB 3.2. Let's rewrite this entire function to support dual-lane in
USB 3.2.

The hub driver matches the port speed ID from the extended port status
to the SSID of the sublink speed attributes to detect if the device
supports SuperSpeed Plus. Currently we don't provide the default gen1x2
and gen2x2 sublink speed capability descriptor for USB 3.2 roothub. The
USB stack depends on this to detect and match the correct speed.
In addition, if the xHCI host provides Protocol Speed ID (PSI)
capability, then make sure to convert Protocol Speed ID Mantissa and
Exponent (PSIM & PSIE) to lane speed for gen1x2 and gen2x2.

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/19cd09b03f96346996270579fd27d38b8a6844aa.1615432770.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c