From owner-svn-src-all@freebsd.org Wed Apr 27 17:59:20 2016 Return-Path: Delivered-To: svn-src-all@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 8D2F5B1E1AB; Wed, 27 Apr 2016 17:59:20 +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 6EFB81F36; Wed, 27 Apr 2016 17:59:20 +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 77B3AB978; Wed, 27 Apr 2016 13:59:19 -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: r298712 - in head/sys: dev/cardbus kern mips/nlm powerpc/ofw sparc64/pci sys Date: Wed, 27 Apr 2016 10:54:42 -0700 Message-ID: <2789741.CjRGbn4rPl@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201604271749.u3RHngl6051451@repo.freebsd.org> References: <201604271749.u3RHngl6051451@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:59:19 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 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: Wed, 27 Apr 2016 17:59:20 -0000 On Wednesday, April 27, 2016 05:49:42 PM John Baldwin wrote: > Author: jhb > Date: Wed Apr 27 17:49:42 2016 > New Revision: 298712 > URL: https://svnweb.freebsd.org/changeset/base/298712 > > Log: > Add a bus_null_rescan() method that always fails with an error. > > Use this in place of kobj_error_method to disable BUS_RESCAN() on > PCI drivers that do not use the "standard" scanning algorithm. This should fix the build. > Modified: > head/sys/dev/cardbus/cardbus.c > head/sys/kern/subr_bus.c > head/sys/mips/nlm/xlp_pci.c > head/sys/powerpc/ofw/ofw_pcibus.c > head/sys/sparc64/pci/ofw_pcibus.c > head/sys/sys/bus.h Note that some of these drivers could be changed to use the "standard" scanning algorithm and support rescans if they moved some of their custom scanning logic into a pci_child_added callback. This is generally true of all but cardbus except that the OFW busses use the OFW tree to drive scanning (so it seems they will add PCI devices that don't appear valid to a PCI scan but are in the OFW tree). I'm not sure how well that can work in practice as no PCI device driver is going to attach to a PCI device with a vendor ID of 0xffff (ACPI doesn't attempt to handle devices that show up in the ACPI namespace but not in a PCI scan). The xlp driver would just move the function-specific fixups into the pci_child_added callback (though the special interrupt routing is perhaps best done in PCI_ASSIGN_INTERRUPT or the like). OFW would walk the OFW tree to find the corresponding node (if one is found) and initialize the OFW ivars (similar to what ACPI does) in the callback. -- John Baldwin