Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2020 17:26:08 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358178 - head/sys/dev/virtio/mmio
Message-ID:  <202002201726.01KHQ8Kg061094@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Thu Feb 20 17:26:08 2020
New Revision: 358178
URL: https://svnweb.freebsd.org/changeset/base/358178

Log:
  virtio: Pass the interrupt type in mmio mode
  
  When we register an interrupt handler we need to pass the intr_type along in
  bus_setup_intr().
  
  The interrupt type matters because it is used to decide if we need to enter
  NET_EPOCH. That meant that vtmmio-based if_vtnet did not, which led to panics
  with INVARIANTS set.
  
  Sponsored by:	Axiado

Modified:
  head/sys/dev/virtio/mmio/virtio_mmio.c

Modified: head/sys/dev/virtio/mmio/virtio_mmio.c
==============================================================================
--- head/sys/dev/virtio/mmio/virtio_mmio.c	Thu Feb 20 17:20:50 2020	(r358177)
+++ head/sys/dev/virtio/mmio/virtio_mmio.c	Thu Feb 20 17:26:08 2020	(r358178)
@@ -196,7 +196,7 @@ vtmmio_setup_intr(device_t dev, enum intr_type type)
 		return (ENXIO);
 	}
 
-	if (bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE,
+	if (bus_setup_intr(dev, sc->res[1], type | INTR_MPSAFE,
 		NULL, vtmmio_vq_intr, sc, &sc->ih)) {
 		device_printf(dev, "Can't setup the interrupt\n");
 		return (ENXIO);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002201726.01KHQ8Kg061094>