Module Name:    src
Committed By:   dyoung
Date:           Fri Apr 17 17:31:01 UTC 2009

Modified Files:
        src/sys/dev/pci: ohci_pci.c

Log Message:
Disable interrupts on the h/w before disestablishing the PCI interrupt
handler.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ohci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ohci_pci.c
diff -u src/sys/dev/pci/ohci_pci.c:1.39 src/sys/dev/pci/ohci_pci.c:1.40
--- src/sys/dev/pci/ohci_pci.c:1.39	Mon Apr 28 20:23:55 2008
+++ src/sys/dev/pci/ohci_pci.c	Fri Apr 17 17:31:01 2009
@@ -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 @@
 	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;

Reply via email to