From owner-svn-src-head@freebsd.org Wed Apr 27 17:23:58 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 A8BCEB1E4E5; Wed, 27 Apr 2016 17:23:58 +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 8AA961077; Wed, 27 Apr 2016 17:23:58 +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 6ACE3B93A; Wed, 27 Apr 2016 13:23:57 -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: r298708 - in head/sys: dev/cardbus dev/pci mips/nlm powerpc/ofw sparc64/pci Date: Wed, 27 Apr 2016 10:23:55 -0700 Message-ID: <1976035.cgz5COcGKZ@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201604271631.u3RGVCjE001316@repo.freebsd.org> References: <201604271631.u3RGVCjE001316@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 13:23:57 -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 17:23:58 -0000 On Wednesday, April 27, 2016 04:31:12 PM John Baldwin wrote: > Author: jhb > Date: Wed Apr 27 16:31:12 2016 > New Revision: 298708 > URL: https://svnweb.freebsd.org/changeset/base/298708 > > Log: > Implement a PCI bus rescan method. > > Rescanning a PCI bus uses the following steps: > - Fetch the current set of child devices and save it in the 'devlist' > array. > - Allocate a parallel array 'unchanged' initalized with NULL pointers. > - Scan the bus checking each slot (and each function on slots with a > multifunction device). > - If a valid function is found, look for a matching device in the 'devlist' > array. If a device is found, save the pointer in the 'unchanged' array. > If a device is not found, add a new device. > - After the scan has finished, walk the 'devlist' array deleting any > devices that do not have a matching pointer in the 'unchanged' array. > - Finally, fetch an updated set of child devices and explicitly attach any > devices that are not present in the 'unchanged' array. > > This builds on the previous changes to move subclass data management into > pci_alloc_devinfo(), pci_child_added(), and bus_child_deleted(). > > Subclasses of the PCI bus use custom rescan logic explicitly override the > rescan method to disable rescans. > > Differential Revision: https://reviews.freebsd.org/D6018 Argh, I thought for certain I had done a tinderbox build, but using kobj_error_method breaks the build. I will test a fix that adds a null_rescan method instead and commit it shortly. -- John Baldwin