diff options
author | neel <neel@FreeBSD.org> | 2013-04-30 01:14:54 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-04-30 01:14:54 +0000 |
commit | 7f49c6dcceb47581a1a7f53829f2de1bd012da94 (patch) | |
tree | 86b3c889084d29316bdbedf46a4715e68e5d019d /usr.sbin/bhyve | |
parent | 773a4e04f45fdf400ea6bb52de5260a75ace7b9e (diff) | |
download | FreeBSD-src-7f49c6dcceb47581a1a7f53829f2de1bd012da94.zip FreeBSD-src-7f49c6dcceb47581a1a7f53829f2de1bd012da94.tar.gz |
Reset some more softc state when the guest resets the virtio network device.
Obtained from: NetApp
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r-- | usr.sbin/bhyve/pci_virtio_net.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c index e988bb6..14bbe0a 100644 --- a/usr.sbin/bhyve/pci_virtio_net.c +++ b/usr.sbin/bhyve/pci_virtio_net.c @@ -259,6 +259,7 @@ pci_vtnet_rxwait(struct pci_vtnet_softc *sc) static void pci_vtnet_update_status(struct pci_vtnet_softc *sc, uint32_t value) { + int i; if (value == 0) { DPRINTF(("vtnet: device reset requested !\n")); @@ -276,6 +277,12 @@ pci_vtnet_update_status(struct pci_vtnet_softc *sc, uint32_t value) pci_vtnet_ring_reset(sc, VTNET_RXQ); pci_vtnet_ring_reset(sc, VTNET_TXQ); + for (i = 0; i < VTNET_MAXQ; i++) + sc->vsc_msix_table_idx[i] = VIRTIO_MSI_NO_VECTOR; + + sc->vsc_isr = 0; + sc->vsc_features = 0; + sc->resetting = 0; } |