Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci use ipl level specified by child when attaching ...



details:   https://anonhg.NetBSD.org/src/rev/7854709d42f7
branches:  trunk
changeset: 822570:7854709d42f7
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Mar 25 17:50:51 2017 +0000

description:
use ipl level specified by child when attaching interrupts, instead of always
using IPL_NET

diffstat:

 sys/dev/pci/virtio.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r afe8fe69c10d -r 7854709d42f7 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c      Sat Mar 25 15:07:21 2017 +0000
+++ b/sys/dev/pci/virtio.c      Sat Mar 25 17:50:51 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: virtio.c,v 1.20 2017/03/25 13:05:09 martin Exp $       */
+/*     $NetBSD: virtio.c,v 1.21 2017/03/25 17:50:51 jdolecek Exp $     */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.20 2017/03/25 13:05:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.21 2017/03/25 17:50:51 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -204,8 +204,8 @@
        if (sc->sc_flags & VIRTIO_F_PCI_INTR_MPSAFE)
                pci_intr_setattr(pc, &sc->sc_ihp[idx], PCI_INTR_MPSAFE, true);
 
-       sc->sc_ihs[idx] = pci_intr_establish_xname(pc, sc->sc_ihp[idx], IPL_NET,
-           virtio_msix_config_intr, sc, device_xname(sc->sc_dev));
+       sc->sc_ihs[idx] = pci_intr_establish_xname(pc, sc->sc_ihp[idx],
+           sc->sc_ipl, virtio_msix_config_intr, sc, device_xname(sc->sc_dev));
        if (sc->sc_ihs[idx] == NULL) {
                aprint_error_dev(self, "couldn't establish MSI-X for config\n");
                goto error;
@@ -215,8 +215,8 @@
        if (sc->sc_flags & VIRTIO_F_PCI_INTR_MPSAFE)
                pci_intr_setattr(pc, &sc->sc_ihp[idx], PCI_INTR_MPSAFE, true);
 
-       sc->sc_ihs[idx] = pci_intr_establish_xname(pc, sc->sc_ihp[idx], IPL_NET,
-           virtio_msix_queue_intr, sc, device_xname(sc->sc_dev));
+       sc->sc_ihs[idx] = pci_intr_establish_xname(pc, sc->sc_ihp[idx],
+           sc->sc_ipl, virtio_msix_queue_intr, sc, device_xname(sc->sc_dev));
        if (sc->sc_ihs[idx] == NULL) {
                aprint_error_dev(self, "couldn't establish MSI-X for queues\n");
                goto error;
@@ -260,7 +260,7 @@
                pci_intr_setattr(pc, &sc->sc_ihp[0], PCI_INTR_MPSAFE, true);
 
        sc->sc_ihs[0] = pci_intr_establish_xname(pc, sc->sc_ihp[0],
-           IPL_NET, virtio_intr, sc, device_xname(sc->sc_dev));
+           sc->sc_ipl, virtio_intr, sc, device_xname(sc->sc_dev));
        if (sc->sc_ihs[0] == NULL) {
                aprint_error_dev(self, "couldn't establish INTx\n");
                return -1;



Home | Main Index | Thread Index | Old Index