summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>1999-09-30 19:09:22 +0000
committergallatin <gallatin@FreeBSD.org>1999-09-30 19:09:22 +0000
commitcaea2233d5bd4987a92d18bc59e01781fcdcdd85 (patch)
tree981de9a7c7d0898b0f1c4727f71089d9a8cfb04f
parent8764dc6a381ceb17c4f0b0073881821023d273c7 (diff)
downloadFreeBSD-src-caea2233d5bd4987a92d18bc59e01781fcdcdd85.zip
FreeBSD-src-caea2233d5bd4987a92d18bc59e01781fcdcdd85.tar.gz
This fix allows cards inserted in one of the bottem-most slots on an xp1000
(behind the built-in ppb on hose 1) to be found: When testing the adaptec controller on alpha, I realized I misread the xp1000 documentation and the way I'm calculating the bus number for PCI config space accesses on the tsunami is wrong. I had thought that a bus behind a ppb should be numbered as the nth bus in that hose, but it actually needs to be the nth global bus within the system. The bus number for the primary bus on a hose must always remain 0 when calculating config space addresses.
-rw-r--r--sys/alpha/pci/tsunami.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/alpha/pci/tsunami.c b/sys/alpha/pci/tsunami.c
index 56ab400..48cdd45 100644
--- a/sys/alpha/pci/tsunami.c
+++ b/sys/alpha/pci/tsunami.c
@@ -275,7 +275,7 @@ tsunami_check_abort(void)
KV(TSUNAMI_CONF(h) | ((b) << 16) | ((s) << 11) | ((f) << 8) | (r))
#define CFGREAD(h, b, s, f, r, op, width, type) \
- int bus = tsunami_bus_within_hose(h, b); \
+ int bus = tsunami_bus_within_hose(h, b) ? b : 0; \
vm_offset_t va = TSUNAMI_CFGADDR(bus, s, f, r, h); \
type data; \
tsunami_clear_abort(); \
@@ -289,7 +289,7 @@ tsunami_check_abort(void)
return data;
#define CFWRITE(h, b, s, f, r, data, op, width) \
- int bus = tsunami_bus_within_hose(h, b); \
+ int bus = tsunami_bus_within_hose(h, b) ? b : 0; \
vm_offset_t va = TSUNAMI_CFGADDR(bus, s, f, r, h); \
tsunami_clear_abort(); \
if (badaddr((caddr_t)va, width)) \
OpenPOWER on IntegriCloud