1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-07 13:14:51 +00:00

For sun4u also add PCI busses with a device unit number of -1

instead of using the PCI bus number, like it's already done for
sun4v in order to deal properly with independently numbered PCI
domains which can't be reenumerated (in the case of sun4u f.e.
Tomatillo bridges). For machines where we need to reenumerate
all PCI busses this change obviously introduces the theoretical
cosmetic problem that the device number of the PCI bus no longer
equals to its PCI bus number. In practice this doesn't happen
as both are assigned linearly and in parallel.
This commit is contained in:
Marius Strobl 2007-06-18 21:46:07 +00:00
parent 9899d5a776
commit 9030c513c8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170929

View File

@ -35,7 +35,6 @@
__FBSDID("$FreeBSD$");
#include "opt_ofw_pci.h"
#include "opt_global.h"
#include <sys/param.h>
#include <sys/kernel.h>
@ -103,6 +102,7 @@ DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0);
static int
ofw_pcib_probe(device_t dev)
{
if ((pci_get_class(dev) == PCIC_BRIDGE) &&
(pci_get_subclass(dev) == PCIS_BRIDGE_PCI) &&
ofw_bus_get_node(dev) != 0) {
@ -115,16 +115,9 @@ ofw_pcib_probe(device_t dev)
static int
ofw_pcib_attach(device_t dev)
{
struct ofw_pcib_gen_softc *sc;
sc = device_get_softc(dev);
ofw_pcib_gen_setup(dev);
pcib_attach_common(dev);
#ifdef SUN4V
device_add_child(dev, "pci", -1);
#else
device_add_child(dev, "pci", sc->ops_pcib_sc.secbus);
#endif
return (bus_generic_attach(dev));
}