summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)