Page MenuHomeFreeBSD

D15821.id43806.diff
No OneTemporary

D15821.id43806.diff

Index: sys/dev/virtio/mmio/virtio_mmio.c
===================================================================
--- sys/dev/virtio/mmio/virtio_mmio.c
+++ sys/dev/virtio/mmio/virtio_mmio.c
@@ -818,8 +818,11 @@
/*
* Setting the status to RESET sets the host device to
- * the original, uninitialized state.
+ * the original, uninitialized state. This includes
+ * clearing pointers to virtqueue, so tear down all the
+ * virtqueues.
*/
+ vtmmio_free_virtqueues(sc);
vtmmio_set_status(sc->dev, VIRTIO_CONFIG_STATUS_RESET);
}
Index: sys/dev/virtio/network/if_vtnet.c
===================================================================
--- sys/dev/virtio/network/if_vtnet.c
+++ sys/dev/virtio/network/if_vtnet.c
@@ -3068,6 +3068,11 @@
vtnet_stop(sc);
+ if (vtnet_alloc_virtqueues(sc) != 0) {
+ device_printf(dev, "cannot allocate virtqueues\n");
+ goto fail;
+ }
+
/* Reinitialize with the host. */
if (vtnet_virtio_reinit(sc) != 0)
goto fail;

File Metadata

Mime Type
text/plain
Expires
Thu, Aug 6, 3:13 AM (10 h, 3 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36067647
Default Alt Text
D15821.id43806.diff (970 B)

Event Timeline