From owner-svn-src-head@FreeBSD.ORG Sat Jun 6 17:08:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E9B9685; Sat, 6 Jun 2015 17:08:27 +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 479441EB8; Sat, 6 Jun 2015 17:08:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B0046B93A; Sat, 6 Jun 2015 13:08:25 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284078 - head/sys/dev/pci Date: Sat, 06 Jun 2015 13:08:16 -0400 Message-ID: <5117505.v1AmJczBtP@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201506061551.t56FpCbX013048@svn.freebsd.org> <14005803.mtbqcRkBJG@ralph.baldwin.cx> 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); Sat, 06 Jun 2015 13:08:25 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 06 Jun 2015 17:08:27 -0000 On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: > > > On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > > > > On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > >> Author: marcel > >> Date: Sat Jun 6 15:51:11 2015 > >> New Revision: 284078 > >> URL: https://svnweb.freebsd.org/changeset/base/284078 > >> > >> Log: > >> Don't return -10000 as the probe priority. That's lower than what > >> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > >> kernel or preloaded, will render your system useless by virtue of > >> attaching to your PCI busses. > >> > >> Return BUS_PROBE_GENERIC instead. It's just the next priority up > >> from BUS_PROBE_HOOVER. No other meaning has been give to its use. > >> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > >> not to think that there must be some reason why these drivers > >> return -10000 in the first place. > > > > BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > > override these, such as acpi_pcib_pci which should override pci_pci > > for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes > > -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > > bridge driver for when ACPI isn't present. It returns -2000. The > > MPTable PCI-PCI bridge driver returns -1000 like ACPI. > > So that means we have a regression. Do you want me to back out > or should we just move forward and fix those too. Yeah, I just now realized this. If you can fix this quickly it's probably ok to just fix it vs backing it out and committing a larger change. For the x86 PCI bridge drivers, I think you can probably use BUS_PROBE_DEFAULT for ACPI and MPTable and BUS_PROBE_LOW_PRIORITY for the pcibios one. However, I haven't looked at other platforms. I believe there are some other PCI-PCI bridge drivers kicking around (for OFW on sparc64 and powerpc at least, not sure if there are others). It might be fine to lower HOOVER as well, but it's probably worth it to fix all drivers to use one of the BUS_PROBE constants (perhaps with an offset like 'BUS_PROBE_GENERIC - 10 or some such') rather than magic values. Unfortunately sweeping all device_probe calls is likely to be a bit tedious. :-/ -- John Baldwin