diff options
author | dfr <dfr@FreeBSD.org> | 2000-02-23 20:25:06 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-02-23 20:25:06 +0000 |
commit | 80c355dfd5d452f36b3a67a3e2da4fc4c0c04a1e (patch) | |
tree | 6e186c995221061328e63033d74c43133d655cfb /sys/amd64 | |
parent | 8d05fe1c7c2f3eb0b5cd349936f4143fab3e16ad (diff) | |
download | FreeBSD-src-80c355dfd5d452f36b3a67a3e2da4fc4c0c04a1e.zip FreeBSD-src-80c355dfd5d452f36b3a67a3e2da4fc4c0c04a1e.tar.gz |
Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2.
Approved by: jkh
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/pci/pci_bus.c | 11 | ||||
-rw-r--r-- | sys/amd64/pci/pci_cfgreg.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c index fd34ad8..f09c907 100644 --- a/sys/amd64/pci/pci_bus.c +++ b/sys/amd64/pci/pci_bus.c @@ -277,7 +277,8 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg, case 0x12258086: s = "Intel 824?? host to PCI bridge"; /* XXX This is a guess */ - *busnum = pci_cfgread(cfg, 0x41, 1); + /* *busnum = pci_cfgread(cfg, 0x41, 1); */ + *busnum = cfg->bus; break; case 0x71208086: s = "Intel 82810 (i810 GMCH) Host To Hub bridge"; @@ -437,11 +438,13 @@ nexus_pcib_identify(driver_t *driver, device_t parent) u_int8_t hdrtype; int found = 0; int pcifunchigh; + int found824xx = 0; if (pci_cfgopen() == 0) return; probe.hose = 0; probe.bus = 0; + retry: for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); @@ -478,9 +481,15 @@ nexus_pcib_identify(driver_t *driver, device_t parent) "pcib", busnum); device_set_desc(child, s); found = 1; + if (id == 0x12258086) + found824xx = 1; } } } + if (found824xx && probe.bus == 0) { + probe.bus++; + goto retry; + } /* * Make sure we add at least one bridge since some old diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c index fd34ad8..f09c907 100644 --- a/sys/amd64/pci/pci_cfgreg.c +++ b/sys/amd64/pci/pci_cfgreg.c @@ -277,7 +277,8 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg, case 0x12258086: s = "Intel 824?? host to PCI bridge"; /* XXX This is a guess */ - *busnum = pci_cfgread(cfg, 0x41, 1); + /* *busnum = pci_cfgread(cfg, 0x41, 1); */ + *busnum = cfg->bus; break; case 0x71208086: s = "Intel 82810 (i810 GMCH) Host To Hub bridge"; @@ -437,11 +438,13 @@ nexus_pcib_identify(driver_t *driver, device_t parent) u_int8_t hdrtype; int found = 0; int pcifunchigh; + int found824xx = 0; if (pci_cfgopen() == 0) return; probe.hose = 0; probe.bus = 0; + retry: for (probe.slot = 0; probe.slot <= PCI_SLOTMAX; probe.slot++) { probe.func = 0; hdrtype = pci_cfgread(&probe, PCIR_HEADERTYPE, 1); @@ -478,9 +481,15 @@ nexus_pcib_identify(driver_t *driver, device_t parent) "pcib", busnum); device_set_desc(child, s); found = 1; + if (id == 0x12258086) + found824xx = 1; } } } + if (found824xx && probe.bus == 0) { + probe.bus++; + goto retry; + } /* * Make sure we add at least one bridge since some old |