actually read the register from the right place, and simplify code a bit.

Index: ehci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ehci.c,v
retrieving revision 1.117
diff -u -r1.117 ehci.c
--- ehci.c      3 Jul 2011 15:47:17 -0000       1.117
+++ ehci.c      4 Jul 2011 17:19:35 -0000
@@ -2148,11 +2148,10 @@
                }
                hubd = ehci_hubd;
                hubd.bNbrPorts = sc->sc_noport;
-               v = EOREAD4(sc, EHCI_HCSPARAMS);
+               v = EREAD4(sc, EHCI_HCSPARAMS);
                USETW(hubd.wHubCharacteristics,
                    EHCI_HCS_PPC(v) ? UHD_PWR_INDIVIDUAL : UHD_PWR_NO_SWITCH |
-                   EHCI_HCS_P_INDICATOR(EREAD4(sc, EHCI_HCSPARAMS))
-                       ? UHD_PORT_IND : 0);
+                   EHCI_HCS_P_INDICATOR(v) ? UHD_PORT_IND : 0);
                hubd.bPwrOn2PwrGood = 200; /* XXX can't find out? */
                for (i = 0, l = sc->sc_noport; l > 0; i++, l -= 8, v >>= 8)
                        hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */

Reply via email to