From owner-svn-src-all@FreeBSD.ORG Sun May 4 00:14:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD64A969; Sun, 4 May 2014 00:14:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9FBD165D; Sun, 4 May 2014 00:14:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s440En0H057951; Sun, 4 May 2014 00:14:49 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s440EnS8057949; Sun, 4 May 2014 00:14:49 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201405040014.s440EnS8057949@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 4 May 2014 00:14:49 +0000 (UTC) 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 00:14:49 -0000 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);