xhci USB 3.1 minor version encoded differently across vendors
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.
Updated by Electric Monk 6 months ago
- Status changed from New to Closed
commit 2ac157364c5658332f534eb882a4a2cd4926c5d7 Author: Robert Mustacchi <email@example.com> Date: 2019-02-21T16:56:43.000Z 10407 xhci USB 3.1 minor version encoded differently across vendors Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Reviewed by: Jordan Hendricks <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Gergő Doma <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>