summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/pci/ofw_pcib.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-06-18 21:46:07 +0000
committermarius <marius@FreeBSD.org>2007-06-18 21:46:07 +0000
commit5af2c4982c0f7030084988f19a669c74fcd12a07 (patch)
tree0a589cc87308072d2380d3f115e1874b54c8fa95 /sys/sparc64/pci/ofw_pcib.c
parentc6b8c1762daf3e14e376f02b83c0631a8bbe3fe7 (diff)
downloadFreeBSD-src-5af2c4982c0f7030084988f19a669c74fcd12a07.zip
FreeBSD-src-5af2c4982c0f7030084988f19a669c74fcd12a07.tar.gz
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.
Diffstat (limited to 'sys/sparc64/pci/ofw_pcib.c')
-rw-r--r--sys/sparc64/pci/ofw_pcib.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/sparc64/pci/ofw_pcib.c b/sys/sparc64/pci/ofw_pcib.c
index 9d20486..aaa2c53 100644
--- a/sys/sparc64/pci/ofw_pcib.c
+++ b/sys/sparc64/pci/ofw_pcib.c
@@ -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));
}
OpenPOWER on IntegriCloud