Hi,

The HCIVERSION register represents the BCD encoded HCI version number,
so it should be printed with %x.
For example, ver `0.150' should be printed as `0.96'.

--- /sys/dev/usb/xhci.c Sun Sep  9 10:40:35 2018
+++ /sys/dev/usb/xhci.c Fri Jan 25 09:05:09 2019
@@ -296,7 +296,7 @@ xhci_init(struct xhci_softc *sc)
        sc->sc_runt_off = XREAD4(sc, XHCI_RTSOFF);
 
        sc->sc_version = XREAD2(sc, XHCI_HCIVERSION);
-       printf(", xHCI %u.%u\n", sc->sc_version >> 8, sc->sc_version & 0xff);
+       printf(", xHCI %x.%x\n", sc->sc_version >> 8, sc->sc_version & 0xff);
 
 #ifdef XHCI_DEBUG
        printf("%s: CAPLENGTH=%#lx\n", DEVNAME(sc), sc->sc_oper_off);

Reply via email to