summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-06-06 17:27:18 +0000
committerjhb <jhb@FreeBSD.org>2003-06-06 17:27:18 +0000
commit29339c88b8fc233bde4accea3c6a658e2e26092f (patch)
tree8341a26cfa8290e521ff1a3c3d3fc00973baf805 /sys/i386
parent55d014b2d90281f91c184837c6d30b05146e83f6 (diff)
downloadFreeBSD-src-29339c88b8fc233bde4accea3c6a658e2e26092f.zip
FreeBSD-src-29339c88b8fc233bde4accea3c6a658e2e26092f.tar.gz
Use the secondary bus number instead of the number of the bus the PCI-PCI
bridge lives on (i.e., the parent bus) when probing the PIR table for a bus. This could cause the PCIBIOS PCI-PCI bridge driver to bogusly attach to bridges that weren't in the PIR but whose parent bus was in the PIR.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/pci/pci_bus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index d7c598d..fe7c7cf 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.c
@@ -652,11 +652,15 @@ DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0);
static int
pcibios_pcib_probe(device_t dev)
{
+ int bus;
if ((pci_get_class(dev) != PCIC_BRIDGE) ||
(pci_get_subclass(dev) != PCIS_BRIDGE_PCI))
return (ENXIO);
- if (pci_probe_route_table(pcib_get_bus(dev)) == 0)
+ bus = pci_read_config(dev, PCIR_SECBUS_1, 1);
+ if (bus == 0)
+ return (ENXIO);
+ if (pci_probe_route_table(bus) == 0)
return (ENXIO);
device_set_desc(dev, "PCIBIOS PCI-PCI bridge");
return (-2000);
OpenPOWER on IntegriCloud