OSDN Git Service

xhci: detect USB 3.2 capable host controllers correctly
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 18 Jun 2019 14:27:48 +0000 (17:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 16:14:38 +0000 (18:14 +0200)
commitddd57980a0fde30f7b5d14b888a2cc84d01610e8
treef0bfe7a1ad55d16d00f75bfbba7d9bcfcc97c94b
parentb8c3b718087bf7c3c8e388eb1f72ac1108a4926e
xhci: detect USB 3.2 capable host controllers correctly

USB 3.2 capability in a host can be detected from the
xHCI Supported Protocol Capability major and minor revision fields.

If major is 0x3 and minor 0x20 then the host is USB 3.2 capable.

For USB 3.2 capable hosts set the root hub lane count to 2.

The Major Revision and Minor Revision fields contain a BCD version number.
The value of the Major Revision field is JJh and the value of the Minor
Revision field is MNh for version JJ.M.N, where JJ = major revision number,
M - minor version number, N = sub-minor version number,
e.g. version 3.1 is represented with a value of 0310h.

Also fix the extra whitespace printed out when announcing regular
SuperSpeed hosts.

Cc: <stable@vger.kernel.org> # v4.18+
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c