Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix missing PCI_INTR_MPSAFE settings in ixl(4)



details:   https://anonhg.NetBSD.org/src/rev/c3b24b3892dd
branches:  trunk
changeset: 1006770:c3b24b3892dd
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Mon Jan 27 08:40:46 2020 +0000

description:
Fix missing PCI_INTR_MPSAFE settings in ixl(4)

diffstat:

 sys/dev/pci/if_ixl.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 265b16febe08 -r c3b24b3892dd sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Mon Jan 27 08:33:24 2020 +0000
+++ b/sys/dev/pci/if_ixl.c      Mon Jan 27 08:40:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ixl.c,v 1.26 2020/01/17 09:42:05 yamaguchi Exp $    */
+/*     $NetBSD: if_ixl.c,v 1.27 2020/01/27 08:40:46 yamaguchi Exp $    */
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -5549,15 +5549,16 @@
                            "couldn't map interrupt\n");
                        break;
                }
+
+               intr_type = pci_intr_type(pa->pa_pc, sc->sc_ihp[0]);
+               sc->sc_nintrs = counts[intr_type];
+               KASSERT(sc->sc_nintrs > 0);
+
                for (i = 0; i < sc->sc_nintrs; i++) {
                        pci_intr_setattr(pa->pa_pc, &sc->sc_ihp[i],
                            PCI_INTR_MPSAFE, true);
                }
 
-               intr_type = pci_intr_type(pa->pa_pc, sc->sc_ihp[0]);
-               sc->sc_nintrs = counts[intr_type];
-               KASSERT(sc->sc_nintrs > 0);
-
                sc->sc_ihs = kmem_alloc(sizeof(sc->sc_ihs[0]) * sc->sc_nintrs,
                    KM_SLEEP);
 



Home | Main Index | Thread Index | Old Index