Bug #10344
xhci port capabilities warning is confusing
100%
Description
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 almost 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> [0]> ::step over kmdb: target stopped at: xhci`xhci_port_count+0xa0: movl -0x44(%rbp),%edx [0]> <rax=K 2000802 [0]> 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 almost 2 years ago
- Status changed from New to Closed
git commit c78b1a4529122c8f26c5b25b88f01dc4800751a0
commit c78b1a4529122c8f26c5b25b88f01dc4800751a0 Author: Robert Mustacchi <rm@joyent.com> Date: 2019-02-12T22:14:57.000Z 10344 xhci port capabilities warning is confusing Reviewed by: Jason King <jason.king@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Mike Zeller <mike.zeller@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>