提交 0ee78c10 编写于 作者: M Mathias Nyman 提交者: Greg Kroah-Hartman

xhci: Show what USB release number the xHC supports from protocol capablity

xhci driver displays the supported xHC USB revision in a message during
driver load:

"Host supports USB 3.1 Enhanced SuperSpeed"

Get the USB minor revision number from the xhci protocol capability.
This will show the correct supported revisions for new USB 3.2 and later
hosts

Don't rely on the SBRN (serial bus revision number) register, it's often
showing 0x30 (USB3.0) for hosts that support USB 3.1
Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f5249461
...@@ -4838,6 +4838,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) ...@@ -4838,6 +4838,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
* quirks * quirks
*/ */
struct device *dev = hcd->self.sysdev; struct device *dev = hcd->self.sysdev;
unsigned int minor_rev;
int retval; int retval;
/* Accept arbitrarily long scatter-gather lists */ /* Accept arbitrarily long scatter-gather lists */
...@@ -4865,12 +4866,19 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) ...@@ -4865,12 +4866,19 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
*/ */
hcd->has_tt = 1; hcd->has_tt = 1;
} else { } else {
/* Some 3.1 hosts return sbrn 0x30, can't rely on sbrn alone */ /*
if (xhci->sbrn == 0x31 || xhci->usb3_rhub.min_rev >= 1) { * Some 3.1 hosts return sbrn 0x30, use xhci supported protocol
xhci_info(xhci, "Host supports USB 3.1 Enhanced SuperSpeed\n"); * minor revision instead of sbrn
*/
minor_rev = xhci->usb3_rhub.min_rev;
if (minor_rev) {
hcd->speed = HCD_USB31; hcd->speed = HCD_USB31;
hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS; hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS;
} }
xhci_info(xhci, "Host supports USB 3.%x %s SuperSpeed\n",
minor_rev,
minor_rev ? "Enhanced" : "");
/* xHCI private pointer was set in xhci_pci_probe for the second /* xHCI private pointer was set in xhci_pci_probe for the second
* registered roothub. * registered roothub.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册