OSDN Git Service

xhci: set missing SuperSpeedPlus Link Protocol bit in roothub descriptor
authorMathias Nyman <mathias.nyman@linux.intel.com>
Mon, 18 Sep 2017 14:39:18 +0000 (17:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:51:18 +0000 (11:51 +0200)
commitf77615db8ae850ef196843502b1d0aaae8e173d2
treeed81ee1ea9609abc6489f7f635545bae8605bfe1
parentf1a04773d773900cd2f670b18c20c86a4218420f
xhci: set missing SuperSpeedPlus Link Protocol bit in roothub descriptor

commit 7bea22b124d77845c85a62eaa29a85ba6cc2f899 upstream.

A SuperSpeedPlus roothub needs to have the Link Protocol (LP) bit set in
the bmSublinkSpeedAttr[] entry of a SuperSpeedPlus descriptor.

If the xhci controller has an optional Protocol Speed ID (PSI) table then
that will be used as a base to create the roothub SuperSpeedPlus
descriptor.
The PSI table does not however necessary contain the LP bit so we need
to set it manually.

Check the psi speed and set LP bit if speed is 10Gbps or higher.
We're not setting it for 5 to 10Gbps as USB 3.1 specification always
mention SuperSpeedPlus for 10Gbps or higher, and some SSIC USB 3.0 speeds
can be over 5Gbps, such as SSIC-G3B-L1 at 5830 Mbps

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c