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.)
This commit is contained in:
parent
ef34de0ca4
commit
6a645c6e26
@ -191,6 +191,7 @@ Static int ohci_str(usb_string_descriptor_t *, int, const char *);
|
|||||||
|
|
||||||
Static void ohci_timeout(void *);
|
Static void ohci_timeout(void *);
|
||||||
Static void ohci_rhsc_able(ohci_softc_t *, int);
|
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_close_pipe(usbd_pipe_handle, ohci_soft_ed_t *);
|
||||||
Static void ohci_abort_xfer(usbd_xfer_handle, usbd_status);
|
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)
|
if (rv != 0)
|
||||||
return (rv);
|
return (rv);
|
||||||
|
|
||||||
|
usb_uncallout(sc->sc_tmo_rhsc, ohci_rhsc_enable, sc);
|
||||||
|
|
||||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
powerhook_disestablish(sc->sc_powerhook);
|
powerhook_disestablish(sc->sc_powerhook);
|
||||||
shutdownhook_disestablish(sc->sc_shutdownhook);
|
shutdownhook_disestablish(sc->sc_shutdownhook);
|
||||||
@ -861,6 +864,8 @@ ohci_init(ohci_softc_t *sc)
|
|||||||
sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
|
sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
usb_callout_init(sc->sc_tmo_rhsc);
|
||||||
|
|
||||||
return (USBD_NORMAL_COMPLETION);
|
return (USBD_NORMAL_COMPLETION);
|
||||||
|
|
||||||
bad5:
|
bad5:
|
||||||
@ -1101,6 +1106,8 @@ ohci_intr1(ohci_softc_t *sc)
|
|||||||
* on until the port has been reset.
|
* on until the port has been reset.
|
||||||
*/
|
*/
|
||||||
ohci_rhsc_able(sc, 0);
|
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--;
|
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
|
#ifdef OHCI_DEBUG
|
||||||
char *ohci_cc_strs[] = {
|
char *ohci_cc_strs[] = {
|
||||||
"NO_ERROR",
|
"NO_ERROR",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user