summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2003-05-17 11:19:25 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2003-05-17 11:19:25 +0000
commit643a8823fa75b71f1a12b8fa56fb73e98aae2eb4 (patch)
tree4d175ddc137941cb5da27c9f09c6928f64c21bc9
parentbed6a4cb9778c43e5856440931132d8093869858 (diff)
try a little harder to not end up with 0 usb ports on amd756 chipsets
ok nate@
-rw-r--r--sys/dev/usb/ohci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index dc9f3aa1084..0eb713e9cfb 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.32 2002/10/12 01:09:44 krw Exp $ */
+/* $OpenBSD: ohci.c,v 1.33 2003/05/17 11:19:24 todd Exp $ */
/* $NetBSD: ohci.c,v 1.104 2001/09/28 23:57:21 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -854,8 +854,11 @@ ohci_init(ohci_softc_t *sc)
* The AMD756 requires a delay before re-reading the register,
* otherwise it will occasionally report 0 ports.
*/
- usb_delay_ms(&sc->sc_bus, OHCI_READ_DESC_DELAY);
- sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
+ sc->sc_noport = 0;
+ for (i = 0; i < 10 && sc->sc_noport == 0; i++) {
+ usb_delay_ms(&sc->sc_bus, OHCI_READ_DESC_DELAY);
+ sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
+ }
#ifdef OHCI_DEBUG
if (ohcidebug > 5)