aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
authorJosef Karthauser <joe@FreeBSD.org>2002-04-07 10:09:23 +0000
committerJosef Karthauser <joe@FreeBSD.org>2002-04-07 10:09:23 +0000
commit649e8d680cba8fa8ad7d550520ed9fc55f19741c (patch)
tree1afa1d0254759e9356d9d54f33cf359f34ae6d0d /sys/dev/usb/ohci.c
parent629ddcf3810b3f56fb5f98cb819436a53df9ca26 (diff)
downloadsrc-649e8d680cba8fa8ad7d550520ed9fc55f19741c.tar.gz
src-649e8d680cba8fa8ad7d550520ed9fc55f19741c.zip
MFNetBSD: ohci.c (1.104), ohcireg.h (1.28)
date: 2001/09/28 23:57:21; author: augustss; Reenable RHSC interrupt after one second so hot plugging works. (From OpenBSD.)
Notes
Notes: svn path=/head/; revision=94052
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 58cdf0ad24f0..bb3e2ae9f668 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -191,6 +191,7 @@ Static int ohci_str(usb_string_descriptor_t *, int, const char *);
Static void ohci_timeout(void *);
Static void ohci_rhsc_able(ohci_softc_t *, int);
+Static void ohci_rhsc_enable(void *);
Static void ohci_close_pipe(usbd_pipe_handle, ohci_soft_ed_t *);
Static void ohci_abort_xfer(usbd_xfer_handle, usbd_status);
@@ -357,6 +358,8 @@ ohci_detach(struct ohci_softc *sc, int flags)
if (rv != 0)
return (rv);
+ usb_uncallout(sc->sc_tmo_rhsc, ohci_rhsc_enable, sc);
+
#if defined(__NetBSD__) || defined(__OpenBSD__)
powerhook_disestablish(sc->sc_powerhook);
shutdownhook_disestablish(sc->sc_shutdownhook);
@@ -861,6 +864,8 @@ ohci_init(ohci_softc_t *sc)
sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
#endif
+ usb_callout_init(sc->sc_tmo_rhsc);
+
return (USBD_NORMAL_COMPLETION);
bad5:
@@ -1101,6 +1106,8 @@ ohci_intr1(ohci_softc_t *sc)
* on until the port has been reset.
*/
ohci_rhsc_able(sc, 0);
+ /* Do not allow RHSC interrupts > 1 per second */
+ usb_callout(sc->sc_tmo_rhsc, hz, ohci_rhsc_enable, sc);
}
sc->sc_bus.intr_context--;
@@ -1125,6 +1132,14 @@ ohci_rhsc_able(ohci_softc_t *sc, int on)
}
}
+void
+ohci_rhsc_enable(void *v_sc)
+{
+ ohci_softc_t *sc = v_sc;
+
+ ohci_rhsc_able(sc, 1);
+}
+
#ifdef OHCI_DEBUG
char *ohci_cc_strs[] = {
"NO_ERROR",