Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 2014 00:14:49 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r265298 - in stable/9/sys/dev/virtio: . pci
Message-ID:  <201405040014.s440EnS8057949@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405040014.s440EnS8057949>