summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2009-04-17 17:31:01 +0000
committerdyoung <dyoung@NetBSD.org>2009-04-17 17:31:01 +0000
commit40bf52a73b0394a58e1a43ac5b72f89a8aeaf340 (patch)
tree47f8f88bd09f2559382fa411098ac3c07f0b35ab /sys/dev
parentd792f4788e2d9d9f36e0dc67bf1be401c326e6bf (diff)
Disable interrupts on the h/w before disestablishing the PCI interrupt
handler.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/ohci_pci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 6d068e9c438..ad0129662a1 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci_pci.c,v 1.39 2008/04/28 20:23:55 martin Exp $ */
+/* $NetBSD: ohci_pci.c,v 1.40 2009/04/17 17:31:01 dyoung Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.39 2008/04/28 20:23:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_pci.c,v 1.40 2009/04/17 17:31:01 dyoung Exp $");
#include "ehci.h"
@@ -171,6 +171,11 @@ ohci_pci_detach(device_ptr_t self, int flags)
rv = ohci_detach(&sc->sc, flags);
if (rv)
return (rv);
+
+ /* Disable interrupts, so we don't get any spurious ones. */
+ bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
+ OHCI_ALL_INTRS);
+
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;