svn commit: r250086 - head/usr.sbin/bhyve

Neel Natu neel at FreeBSD.org
Tue Apr 30 01:14:55 UTC 2013


Author: neel
Date: Tue Apr 30 01:14:54 2013
New Revision: 250086
URL: http://svnweb.freebsd.org/changeset/base/250086

Log:
  Reset some more softc state when the guest resets the virtio network device.
  
  Obtained from:	NetApp

Modified:
  head/usr.sbin/bhyve/pci_virtio_net.c

Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c	Tue Apr 30 00:49:30 2013	(r250085)
+++ head/usr.sbin/bhyve/pci_virtio_net.c	Tue Apr 30 01:14:54 2013	(r250086)
@@ -259,6 +259,7 @@ pci_vtnet_rxwait(struct pci_vtnet_softc 
 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
 		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;
 	}
 


More information about the svn-src-all mailing list