From 9716a5f26d5b3397ee7fffbe8e0a549b6ec4efe0 Mon Sep 17 00:00:00 2001 From: augustss Date: Tue, 20 Nov 2001 21:12:46 +0000 Subject: [PATCH] Don't bother with interrupts when being disconnected. --- sys/dev/usb/ohci.c | 7 +++++-- sys/dev/usb/uhci.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index b9642270b8d4..b415622bf1a5 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.110 2001/11/20 16:08:10 augustss Exp $ */ +/* $NetBSD: ohci.c,v 1.111 2001/11/20 21:12:46 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.110 2001/11/20 16:08:10 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.111 2001/11/20 21:12:46 augustss Exp $"); #include #include @@ -1056,6 +1056,9 @@ ohci_intr(void *p) { ohci_softc_t *sc = p; + if (sc->sc_dying) + return (0); + /* If we get an interrupt while polling, then just ignore it. */ if (sc->sc_bus.use_polling) { #ifdef DIAGNOSTIC diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 8e86405e5fc4..0065d876e9f6 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.145 2001/11/20 16:08:10 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.146 2001/11/20 21:12:46 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.145 2001/11/20 16:08:10 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.146 2001/11/20 21:12:46 augustss Exp $"); #include #include @@ -1166,6 +1166,9 @@ uhci_intr(void *arg) { uhci_softc_t *sc = arg; + if (sc->sc_dying) + return (0); + DPRINTFN(15,("uhci_intr: real interrupt\n")); if (sc->sc_bus.use_polling) { #ifdef DIAGNOSTIC