aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>1999-09-30 19:09:22 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>1999-09-30 19:09:22 +0000
commita76245d21d20a0db36f498cf01af3e3cc2d009ad (patch)
tree2c6a463ec9994bd26bb6e564995b923334e16113 /sys/alpha
parent263ab97134d5ed79aca4a55c5f5b0558c4cc10f9 (diff)
downloadsrc-a76245d21d20a0db36f498cf01af3e3cc2d009ad.tar.gz
src-a76245d21d20a0db36f498cf01af3e3cc2d009ad.zip
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.
Notes
Notes: svn path=/head/; revision=51823
Diffstat (limited to 'sys/alpha')
-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 56ab400f6574..48cdd457e948 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)) \