Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci first disestablish interrupt, then release



details:   https://anonhg.NetBSD.org/src/rev/d85bc6a7fabc
branches:  trunk
changeset: 445323:d85bc6a7fabc
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Oct 22 21:40:45 2018 +0000

description:
first disestablish interrupt, then release

diffstat:

 sys/dev/pci/ahcisata_pci.c |  14 +++++++-------
 sys/dev/pci/siisata_pci.c  |  13 +++++++------
 2 files changed, 14 insertions(+), 13 deletions(-)

diffs (79 lines):

diff -r af5af7798306 -r d85bc6a7fabc sys/dev/pci/ahcisata_pci.c
--- a/sys/dev/pci/ahcisata_pci.c        Mon Oct 22 21:25:23 2018 +0000
+++ b/sys/dev/pci/ahcisata_pci.c        Mon Oct 22 21:40:45 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_pci.c,v 1.39 2018/10/22 21:04:53 jdolecek Exp $       */
+/*     $NetBSD: ahcisata_pci.c,v 1.40 2018/10/22 21:40:45 jdolecek Exp $       */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.39 2018/10/22 21:04:53 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.40 2018/10/22 21:40:45 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -343,16 +343,16 @@
 
        pmf_device_deregister(dv);
 
+       if (psc->sc_ih != NULL) {
+               pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
+               psc->sc_ih = NULL;
+       }
+
        if (psc->sc_pihp != NULL) {
                pci_intr_release(psc->sc_pc, psc->sc_pihp, 1);
                psc->sc_pihp = NULL;
        }
 
-       if (psc->sc_ih != NULL) {
-               pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
-               psc->sc_ih = NULL;
-       }
-
        bus_space_unmap(sc->sc_ahcit, sc->sc_ahcih, sc->sc_ahcis);
 
        return 0;
diff -r af5af7798306 -r d85bc6a7fabc sys/dev/pci/siisata_pci.c
--- a/sys/dev/pci/siisata_pci.c Mon Oct 22 21:25:23 2018 +0000
+++ b/sys/dev/pci/siisata_pci.c Mon Oct 22 21:40:45 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_pci.c,v 1.17 2018/10/22 20:57:07 jdolecek Exp $ */
+/* $NetBSD: siisata_pci.c,v 1.18 2018/10/22 21:40:45 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.17 2018/10/22 20:57:07 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.18 2018/10/22 21:40:45 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -290,15 +290,16 @@
        if (rv)
                return rv;
 
+       if (psc->sc_ih != NULL) {
+               pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
+               psc->sc_ih = NULL;
+       }
+
        if (psc->sc_pihp != NULL) {
                pci_intr_release(psc->sc_pc, psc->sc_pihp, 1);
                psc->sc_pihp = NULL;
        }
        
-       if (psc->sc_ih != NULL) {
-               pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
-       }
-
        bus_space_unmap(sc->sc_prt, sc->sc_prh, sc->sc_prs);
        bus_space_unmap(sc->sc_grt, sc->sc_grh, sc->sc_grs);
 



Home | Main Index | Thread Index | Old Index