Date: Tue, 11 Mar 2008 16:24:19 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 137412 for review Message-ID: <200803111624.m2BGOJeI076873@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137412 Change 137412 by hselasky@hselasky_laptop001 on 2008/03/11 16:23:57 EHCI workarounds for what looks like a BIOS or SMI bug. Reported by John Baldwin. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#31 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#31 (text+ko) ==== @@ -85,7 +85,6 @@ #define PCI_EHCI_BASE_REG 0x10 -static void ehci_pci_givecontroller(device_t self); static void ehci_pci_takecontroller(device_t self); static device_probe_t ehci_pci_probe; @@ -131,7 +130,6 @@ if (err) return (err); ehci_shutdown(sc); - ehci_pci_givecontroller(self); return (0); } @@ -435,8 +433,13 @@ continue; } legsup = eec; - pci_write_config(self, eecp, legsup | EHCI_LEGSUP_OSOWNED, 4); if (legsup & EHCI_LEGSUP_BIOSOWNED) { + /* + * Only set the "OSOWNED" bit if the + * "BIOSOWNED" bit is set: + */ + pci_write_config(self, eecp, + legsup | EHCI_LEGSUP_OSOWNED, 4); device_printf(sc->sc_bus.bdev, "waiting for BIOS " "to give up control\n"); @@ -454,25 +457,6 @@ } } -static void -ehci_pci_givecontroller(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - uint32_t cparams, eec, legsup; - int eecp; - - cparams = EREAD4(sc, EHCI_HCCPARAMS); - for (eecp = EHCI_HCC_EECP(cparams); eecp != 0; - eecp = EHCI_EECP_NEXT(eec)) { - eec = pci_read_config(self, eecp, 4); - if (EHCI_EECP_ID(eec) != EHCI_EC_LEGSUP) { - continue; - } - legsup = eec; - pci_write_config(self, eecp, legsup & ~EHCI_LEGSUP_OSOWNED, 4); - } -} - static driver_t ehci_driver = { .name = "ehci",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803111624.m2BGOJeI076873>