From owner-svn-src-head@freebsd.org Wed Apr 27 16:42:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 568FAB1E76A; Wed, 27 Apr 2016 16:42:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A9E1139; Wed, 27 Apr 2016 16:42:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 529ACB93C; Wed, 27 Apr 2016 12:42:34 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298709 - in head: lib/libdevctl sys/kern sys/sys usr.sbin/devctl Date: Wed, 27 Apr 2016 09:42:31 -0700 Message-ID: <1568866.L86RL8nV80@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201604271633.u3RGXHed004024@repo.freebsd.org> References: <201604271633.u3RGXHed004024@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 27 Apr 2016 12:42:34 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Wed, 27 Apr 2016 16:42:35 -0000 On Wednesday, April 27, 2016 04:33:17 PM John Baldwin wrote: > Author: jhb > Date: Wed Apr 27 16:33:17 2016 > New Revision: 298709 > URL: https://svnweb.freebsd.org/changeset/base/298709 > > Log: > Add 'devctl delete' that calls device_delete_child(). > > 'devctl delete' can be used to delete a device that is no longer present. > As an anti-foot-shooting measure, 'delete' will not delete a device > unless it's parent bus says it is no longer present. This can be > overridden by passing the force ('-f') flag. > > Note that this command should be used with care. If a device is deleted > that is actually present it can't be resurrected unless the parent bus > device's driver supports rescans. > > Differential Revision: https://reviews.freebsd.org/D6019 Oops, both of the devctl commits probably warranted a 'Relnotes: yes'. One obscure-ish use case for these commands is if you are working with a PCI FPGA adapter that you can flash while the host machine is running. The new configuration may involve changes to BAR layout, etc. In that case you should now be able to 'devctl delete' the device before flashing it and 'devctl rescan' the parent bus after the flash is complete. You can also use 'devctl rescan' for a poor-man's PCI-e hotplug support on bridges that support automated PCI-e hotplug (no power controller, etc.) such as the ExpressCard slot on the two Lenovo's I have (T400 and X220). -- John Baldwin