aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/pci
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2000-02-23 20:25:06 +0000
committerDoug Rabson <dfr@FreeBSD.org>2000-02-23 20:25:06 +0000
commitac19291f358024aa9090ef5ab0d2166d982ea9b2 (patch)
tree0e4d1f83ac361486bea69d1c0511eda3e36d6cf4 /sys/amd64/pci
parent6d37c73e26938038dc37a7302439505668a220e8 (diff)
downloadsrc-ac19291f358024aa9090ef5ab0d2166d982ea9b2.tar.gz
src-ac19291f358024aa9090ef5ab0d2166d982ea9b2.zip
Add a workaround to allow us to detect the second pci bus on an HP
Netserver LS/2. Approved by: jkh
Notes
Notes: svn path=/head/; revision=57402
Diffstat (limited to 'sys/amd64/pci')
-rw-r--r--sys/amd64/pci/pci_bus.c11
-rw-r--r--sys/amd64/pci/pci_cfgreg.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index fd34ad85380c..f09c907a4346 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 fd34ad85380c..f09c907a4346 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