From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 04:20:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7DD5C94; Sun, 1 Sep 2013 04:20:24 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96C4624AF; Sun, 1 Sep 2013 04:20:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r814KO8d098391; Sun, 1 Sep 2013 04:20:24 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r814KOgK098389; Sun, 1 Sep 2013 04:20:24 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309010420.r814KOgK098389@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 1 Sep 2013 04:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255110 - in head/sys/dev/virtio: . pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 04:20:24 -0000 Author: bryanv Date: Sun Sep 1 04:20:23 2013 New Revision: 255110 URL: http://svnweb.freebsd.org/changeset/base/255110 Log: Add optional VirtIO device method for post-attach notifications This is called after the parent device (ie virito_pci) has completed the device attachment/initialization. Modified: head/sys/dev/virtio/pci/virtio_pci.c head/sys/dev/virtio/virtio_if.m Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Sun Sep 1 04:16:43 2013 (r255109) +++ head/sys/dev/virtio/pci/virtio_pci.c Sun Sep 1 04:20:23 2013 (r255110) @@ -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: head/sys/dev/virtio/virtio_if.m ============================================================================== --- head/sys/dev/virtio/virtio_if.m Sun Sep 1 04:16:43 2013 (r255109) +++ head/sys/dev/virtio/virtio_if.m Sun Sep 1 04:20:23 2013 (r255110) @@ -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);