svn commit: r265298 - in stable/9/sys/dev/virtio: . pci

Bryan Venteicher bryanv at FreeBSD.org
Sun May 4 00:14:49 UTC 2014


Author: bryanv
Date: Sun May  4 00:14:49 2014
New Revision: 265298
URL: http://svnweb.freebsd.org/changeset/base/265298

Log:
  MFC r255110
  
   - Add optional VirtIO device method for post-attach notifications

Modified:
  stable/9/sys/dev/virtio/pci/virtio_pci.c
  stable/9/sys/dev/virtio/virtio_if.m
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c
==============================================================================
--- stable/9/sys/dev/virtio/pci/virtio_pci.c	Sun May  4 00:13:26 2014	(r265297)
+++ stable/9/sys/dev/virtio/pci/virtio_pci.c	Sun May  4 00:14:49 2014	(r265298)
@@ -757,8 +757,10 @@ vtpci_probe_and_attach_child(struct vtpc
 		vtpci_release_child_resources(sc);
 		/* Reset status for future attempt. */
 		vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_ACK);
-	} else
+	} else {
 		vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK);
+		VIRTIO_ATTACH_COMPLETED(child);
+	}
 }
 
 static int

Modified: stable/9/sys/dev/virtio/virtio_if.m
==============================================================================
--- stable/9/sys/dev/virtio/virtio_if.m	Sun May  4 00:13:26 2014	(r265297)
+++ stable/9/sys/dev/virtio/virtio_if.m	Sun May  4 00:14:49 2014	(r265298)
@@ -31,6 +31,18 @@ INTERFACE virtio;
 
 CODE {
 	static int
+	virtio_default_attach_completed(device_t dev)
+	{
+		return (0);
+	}
+};
+
+METHOD int attach_completed {
+	device_t	dev;
+} DEFAULT virtio_default_attach_completed;
+
+CODE {
+	static int
 	virtio_default_config_change(device_t dev)
 	{
 		return (0);


More information about the svn-src-stable-9 mailing list