summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sparc64/pci')
-rw-r--r--sys/sparc64/pci/apb.c2
-rw-r--r--sys/sparc64/pci/ofw_pcibus.c11
-rw-r--r--sys/sparc64/pci/psycho.c3
3 files changed, 12 insertions, 4 deletions
diff --git a/sys/sparc64/pci/apb.c b/sys/sparc64/pci/apb.c
index 58ec72c..9455882 100644
--- a/sys/sparc64/pci/apb.c
+++ b/sys/sparc64/pci/apb.c
@@ -184,6 +184,8 @@ apb_attach(device_t dev)
ofw_pcib_gen_setup(dev);
if (bootverbose) {
+ device_printf(dev, " domain %d\n",
+ sc->sc_bsc.ops_pcib_sc.domain);
device_printf(dev, " secondary bus %d\n",
sc->sc_bsc.ops_pcib_sc.secbus);
device_printf(dev, " subordinate bus %d\n",
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c
index a3e1e8b..0a03696 100644
--- a/sys/sparc64/pci/ofw_pcibus.c
+++ b/sys/sparc64/pci/ofw_pcibus.c
@@ -174,17 +174,19 @@ ofw_pcibus_attach(device_t dev)
struct ofw_pci_register pcir;
struct ofw_pcibus_devinfo *dinfo;
phandle_t node, child;
- u_int slot, busno, func;
+ u_int busno, domain, func, slot;
pcib = device_get_parent(dev);
+ domain = pcib_get_domain(dev);
/*
* Ask the bridge for the bus number - in some cases, we need to
* renumber buses, so the firmware information cannot be trusted.
*/
busno = pcib_get_bus(dev);
if (bootverbose)
- device_printf(dev, "physical bus=%d\n", busno);
+ device_printf(dev, "domain=%d, physical bus=%d\n",
+ domain, busno);
node = ofw_bus_get_node(dev);
for (child = OF_child(node); child != 0; child = OF_peer(child)) {
@@ -192,11 +194,12 @@ ofw_pcibus_attach(device_t dev)
continue;
slot = OFW_PCI_PHYS_HI_DEVICE(pcir.phys_hi);
func = OFW_PCI_PHYS_HI_FUNCTION(pcir.phys_hi);
- if (pci_find_bsf(busno, slot, func) != NULL)
+ /* Some OFW device trees contain dupes. */
+ if (pci_find_dbsf(domain, busno, slot, func) != NULL)
continue;
ofw_pcibus_setup_device(pcib, busno, slot, func);
dinfo = (struct ofw_pcibus_devinfo *)pci_read_device(pcib,
- busno, slot, func, sizeof(*dinfo));
+ domain, busno, slot, func, sizeof(*dinfo));
if (dinfo == NULL)
continue;
if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) !=
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index be6a4e3..0c2c92d 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -1030,6 +1030,9 @@ psycho_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
sc = device_get_softc(dev);
switch (which) {
+ case PCIB_IVAR_DOMAIN:
+ *result = 0;
+ return (0);
case PCIB_IVAR_BUS:
*result = sc->sc_pci_secbus;
return (0);
OpenPOWER on IntegriCloud