Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci don't attempt to re-unmap the interrupt on detach



details:   https://anonhg.NetBSD.org/src/rev/c61892e513bc
branches:  trunk
changeset: 782678:c61892e513bc
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Wed Nov 14 01:04:45 2012 +0000

description:
don't attempt to re-unmap the interrupt on detach

diffstat:

 sys/dev/pci/pciide_common.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 2fd6e294f6b7 -r c61892e513bc sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c       Tue Nov 13 22:30:38 2012 +0000
+++ b/sys/dev/pci/pciide_common.c       Wed Nov 14 01:04:45 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_common.c,v 1.57 2012/07/31 15:50:36 bouyer Exp $        */
+/*     $NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $      */
 
 
 /*
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.57 2012/07/31 15:50:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -249,12 +249,16 @@
             channel++) {
                cp = &sc->pciide_channels[channel];
                if (cp->compat != 0)
-                       if (cp->ih != NULL)
+                       if (cp->ih != NULL) {
                               pciide_unmap_compat_intr(sc->sc_pc, cp, channel);
+                              cp->ih = NULL;
+                       }
        }
 
-       if (sc->sc_pci_ih != NULL)
+       if (sc->sc_pci_ih != NULL) {
                pci_intr_disestablish(sc->sc_pc, sc->sc_pci_ih);
+               sc->sc_pci_ih = NULL;
+       }
 
        return pciide_common_detach(sc, flags);
 }



Home | Main Index | Thread Index | Old Index