aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/pci/ofw_pcib.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2007-06-18 21:46:07 +0000
committerMarius Strobl <marius@FreeBSD.org>2007-06-18 21:46:07 +0000
commit9030c513c8923520733c89094504a016f2300069 (patch)
tree0a589cc87308072d2380d3f115e1874b54c8fa95 /sys/sparc64/pci/ofw_pcib.c
parent9899d5a7764885cbc7e7db658164f98363c250f0 (diff)
downloadsrc-9030c513c8923520733c89094504a016f2300069.tar.gz
src-9030c513c8923520733c89094504a016f2300069.zip
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.
Notes
Notes: svn path=/head/; revision=170929
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 9d20486bde6d..aaa2c530cc7a 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));
}