From df3e5efa87711aaaab059d6fa27a956519931a02 Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Sun, 15 Jan 2006 20:41:04 +0000 Subject: Set sc_dying to 1 when detaching. In NetBSD and OpenBSD this was done by the DVACT_DEACTIVATE case in *hci_activate(), but we don't use that code in FreeBSD so it was never set. --- sys/dev/usb/ehci.c | 2 ++ sys/dev/usb/ohci.c | 2 ++ sys/dev/usb/uhci.c | 2 ++ 3 files changed, 6 insertions(+) (limited to 'sys/dev/usb') diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index e084910cc36f0..eeb47a482dc54 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -935,6 +935,8 @@ ehci_detach(struct ehci_softc *sc, int flags) if (rv != 0) return (rv); +#else + sc->sc_dying = 1; #endif EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index d2e25d356a440..88ddfc7f36671 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -393,6 +393,8 @@ ohci_detach(struct ohci_softc *sc, int flags) if (rv != 0) return (rv); +#else + sc->sc_dying = 1; #endif usb_uncallout(sc->sc_tmo_rhsc, ohci_rhsc_enable, sc); diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 05fdd1eddb184..3382d5b424c6e 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -585,6 +585,8 @@ uhci_detach(struct uhci_softc *sc, int flags) if (rv != 0) return (rv); +#else + sc->sc_dying = 1; #endif UWRITE2(sc, UHCI_INTR, 0); /* disable interrupts */ -- cgit v1.3