Project

General

Profile

Bug #10407

xhci USB 3.1 minor version encoded differently across vendors

Added by Robert Mustacchi 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
2019-02-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

We've seen that there are some issues with our detection of USB 3.1 ports. There are a few different things that have come up:

  • On some systems we see a warning about an unknown port type of 3.10.
  • We aren't always correctly detecting the number of USB 3.1 ports for topo purposes.

This boils down to a disagreement between how 3.1 should be shown in the xHCI Supported Protocol Capability. While the xhci specification says it should be 0x01 in Table 155: xHCI Supported Protocols, we've found cases in the wild where the value 0x10 is being used on some AMD derived controllers. The value 0x10 isn't crazy as this is the BCD (binary coded decimal) version of the value that the USB 3.1 specification uses. As such, we need to look for both.

The latter problem is just a simple typo.


To test this I booted on two different systems which have USB 3.1 ports, one a Kaby Lake based NUC, the other a Coffee Lake based desktop. In both cases we now properly counted the USB 3.1 ports that were found. In addition, I booted this on a few USB 3.0 based systems and found that nothing out of whack was there. Finally, I worked with a community member to verify that on their AMD based system where the revision was reported the other way, as 10h, that we no longer generate warnings and properly find all of their USB ports.

History

#1

Updated by Electric Monk 4 months ago

  • Status changed from New to Closed

git commit 2ac157364c5658332f534eb882a4a2cd4926c5d7

commit  2ac157364c5658332f534eb882a4a2cd4926c5d7
Author: Robert Mustacchi <rm@joyent.com>
Date:   2019-02-21T16:56:43.000Z

    10407 xhci USB 3.1 minor version encoded differently across vendors
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Jordan Hendricks <jordan.hendricks@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF