summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-06-07 22:26:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-06-07 22:26:35 +0000
commit0e6e36db1460cfd12df1f2e2a905a6cf620d86c1 (patch)
tree97aac09c0a35e4ad2eff1dac0c64e3bdc4c0aaef /sys/dev/usb
parenta91c22d3d7ca294b92e2cc6e8adbf01d9abdaa63 (diff)
Fix more timeout handling issues in ohci. There are still cursed harrdware
that will keep dying with this applied, though. Discussed with drahn@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 008038435de..b6f3d9bf5a0 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.28 2002/05/07 18:29:18 nate Exp $ */
+/* $OpenBSD: ohci.c,v 1.29 2002/06/07 22:26:34 miod 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 $ */
@@ -871,9 +871,7 @@ ohci_init(ohci_softc_t *sc)
sc->sc_powerhook = powerhook_establish(ohci_power, sc);
sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
#endif
-#if defined(__OpenBSD__)
- timeout_set(&sc->sc_tmo_rhsc, ohci_rhsc_enable, sc);
-#endif
+ usb_callout_init(sc->sc_tmo_rhsc);
return (USBD_NORMAL_COMPLETION);
@@ -1150,10 +1148,8 @@ ohci_intr1(ohci_softc_t *sc)
* on until the port has been reset.
*/
ohci_rhsc_able(sc, 0);
-#if defined (__OpenBSD__)
/* Do not allow RHSC interrupts > 1 per second */
- timeout_add(&sc->sc_tmo_rhsc, hz);
-#endif
+ usb_callout(sc->sc_tmo_rhsc, hz, ohci_rhsc_enable, sc);
}
sc->sc_bus.intr_context--;