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
This commit is contained in:
Kristof Provost 2020-02-20 17:26:08 +00:00
parent 1a7ba9a01c
commit 55cd93249b

View File

@ -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);