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 over 2 years 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 over 2 years ago
- Status changed from New to Closed
commit c78b1a4529122c8f26c5b25b88f01dc4800751a0 Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2019-02-12T22:14:57.000Z 10344 xhci port capabilities warning is confusing Reviewed by: Jason King <email@example.com> Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Reviewed by: Mike Zeller <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Gergő Mihály Doma <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>