PERFORCE change 181608 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jul 30 19:16:21 UTC 2010
http://p4web.freebsd.org/@@181608?ac=10
Change 181608 by hselasky at hselasky_laptop001 on 2010/07/30 19:15:41
USB controller (EHCI):
- fix reading EHCI_HCSPARAMS from wrong register offset.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#55 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#55 (text+ko) ====
@@ -3114,7 +3114,6 @@
uint16_t i;
uint16_t value;
uint16_t index;
- uint8_t l;
usb_error_t err;
USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
@@ -3318,20 +3317,23 @@
err = USB_ERR_IOERROR;
goto done;
}
- v = EOREAD4(sc, EHCI_HCSPARAMS);
+ v = EREAD4(sc, EHCI_HCSPARAMS);
sc->sc_hub_desc.hubd = ehci_hubd;
sc->sc_hub_desc.hubd.bNbrPorts = sc->sc_noport;
- USETW(sc->sc_hub_desc.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));
+
+ if (EHCI_HCS_PPC(v))
+ i = UHD_PWR_INDIVIDUAL;
+ else
+ i = UHD_PWR_NO_SWITCH;
+
+ if (EHCI_HCS_P_INDICATOR(v))
+ i |= UHD_PORT_IND;
+
+ USETW(sc->sc_hub_desc.hubd.wHubCharacteristics, i);
/* XXX can't find out? */
sc->sc_hub_desc.hubd.bPwrOn2PwrGood = 200;
- for (l = 0; l < sc->sc_noport; l++) {
- /* XXX can't find out? */
- sc->sc_hub_desc.hubd.DeviceRemovable[l / 8] &= ~(1 << (l % 8));
- }
+ /* XXX don't know if ports are removable or not */
sc->sc_hub_desc.hubd.bDescLength =
8 + ((sc->sc_noport + 7) / 8);
len = sc->sc_hub_desc.hubd.bDescLength;
More information about the p4-projects
mailing list