svn commit: r284078 - head/sys/dev/pci

John Baldwin jhb at freebsd.org
Sat Jun 6 17:21:27 UTC 2015


On Saturday, June 06, 2015 10:15:23 AM Marcel Moolenaar wrote:
> 
> > On Jun 6, 2015, at 10:08 AM, John Baldwin <jhb at FreeBSD.org> wrote:
> > 
> > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote:
> >> 
> >>> On Jun 6, 2015, at 9:03 AM, John Baldwin <jhb at FreeBSD.org> 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.
> 
> I opted to back it out. I searched for all drivers that use
> BUS_PROBE_HOOVER and it’s exactly one: proto(4). That’s a lot
> easier then finding all drivers that return some negative
> value that has some relation to PCI busses...
> 
> I’m just going to change BUS_PROBE_HOOVER to -1000000 instead.
> In follow-up rounds we can change magical constants to defines
> to make the whole pecking order more obvious/visible.

Ok.

-- 
John Baldwin


More information about the svn-src-all mailing list