xhci port capabilities warning is confusing
Today we parse the xhci port capabilities section to try and find what exists. When we encounter a port version that we don't understand, we issue a warning. This ends up looking like:
WARNING: xhci0: encountered port capabilities with unknown major USB version: 51382274
This warning is confusing for two reasons. One is that that number makes no sense. This is raw value of the port configuration register. We should just use the major and minor version. Secondly, this is confusing because it's not actually a major version specifically.
The fix will be to have it look like %x.%x which would become 3.10.
Updated by Robert Mustacchi 5 months ago
To test this, I manually stepped through xhci_port_count. When we read the version from the register, I edited it in mdb as follows:
xhci`xhci_port_count+0x9b: call -0x1030 <xhci`xhci_get32> > ::step over kmdb: target stopped at: xhci`xhci_port_count+0xa0: movl -0x44(%rbp),%edx > <rax=K 2000802 > 23230802>rax
With that in place, we eventually saw:
WARNING: xhci0: encountered port capabilities with unknown USB version: 23.23
Which makes a lot more sense and is useful to folks.
Updated by Electric Monk 5 months ago
- Status changed from New to Closed
commit c78b1a4529122c8f26c5b25b88f01dc4800751a0 Author: Robert Mustacchi <email@example.com> Date: 2019-02-12T22:14:57.000Z 10344 xhci port capabilities warning is confusing Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Mike Zeller <firstname.lastname@example.org> Reviewed by: Toomas Soome <email@example.com> Reviewed by: Gergő Mihály Doma <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>