Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Jun 2015 13:21:21 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284078 - head/sys/dev/pci
Message-ID:  <9581407.amWtf3FX4v@ralph.baldwin.cx>
In-Reply-To: <683C7AD0-A2E7-4EA8-8F98-D1D52F40C073@xcllnt.net>
References:  <201506061551.t56FpCbX013048@svn.freebsd.org> <5117505.v1AmJczBtP@ralph.baldwin.cx> <683C7AD0-A2E7-4EA8-8F98-D1D52F40C073@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, June 06, 2015 10:15:23 AM Marcel Moolenaar wrote:
>=20
> > On Jun 6, 2015, at 10:08 AM, John Baldwin <jhb@FreeBSD.org> wrote:
> >=20
> > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote:
> >>=20
> >>> On Jun 6, 2015, at 9:03 AM, John Baldwin <jhb@FreeBSD.org> wrote:=

> >>>=20
> >>> 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
> >>>>=20
> >>>> Log:
> >>>> Don't return -10000 as the probe priority. That's lower than wha=
t
> >>>> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into t=
he
> >>>> kernel or preloaded, will render your system useless by virtue o=
f
> >>>> attaching to your PCI busses.
> >>>>=20
> >>>> 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.
> >>>=20
> >>> BUS_PROBE_DEFAULT would conflict with other drivers that are supp=
osed to
> >>> override these, such as acpi_pcib_pci which should override pci_p=
ci
> >>> for PCI-PCI bridges in the ACPI namespace.  That driver currently=
 hardcodes
> >>> -1000 itself. :-/  Then there's pcibios_pcib_probe for the $PIR P=
CI-PCI
> >>> bridge driver for when ACPI isn't present.  It returns -2000.  Th=
e
> >>> MPTable PCI-PCI bridge driver returns -1000 like ACPI.
> >>=20
> >> So that means we have a regression. Do you want me to back out
> >> or should we just move forward and fix those too.
> >=20
> > Yeah, I just now realized this.  If you can fix this quickly it's p=
robably ok
> > to just fix it vs backing it out and committing a larger change.
>=20
> I opted to back it out. I searched for all drivers that use
> BUS_PROBE_HOOVER and it=E2=80=99s exactly one: proto(4). That=E2=80=99=
s a lot
> easier then finding all drivers that return some negative
> value that has some relation to PCI busses...
>=20
> I=E2=80=99m 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.

--=20
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9581407.amWtf3FX4v>