From 17f2c62587368cb471c8518b5dcc7651892ccac7 Mon Sep 17 00:00:00 2001 From: dfr Date: Wed, 3 Oct 2001 08:25:58 +0000 Subject: The encoding for the bus being passed to SAL was completely wrong. --- sys/ia64/pci/nexus_pcib.c | 2 +- sys/ia64/pci/pci_cfgreg.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/ia64/pci') diff --git a/sys/ia64/pci/nexus_pcib.c b/sys/ia64/pci/nexus_pcib.c index fa47654..3569682 100644 --- a/sys/ia64/pci/nexus_pcib.c +++ b/sys/ia64/pci/nexus_pcib.c @@ -51,7 +51,7 @@ nexus_pcib_maxslots(device_t dev) /* read configuration space register */ #define SAL_PCI_ADDRESS(bus, slot, func, reg) \ - (((bus) << 23) | ((slot) << 11) | ((func) << 8) | (reg)) + (((bus) << 16) | ((slot) << 11) | ((func) << 8) | (reg)) static u_int32_t nexus_pcib_read_config(device_t dev, int bus, int slot, int func, diff --git a/sys/ia64/pci/pci_cfgreg.c b/sys/ia64/pci/pci_cfgreg.c index 649b7a9..cef743b 100644 --- a/sys/ia64/pci/pci_cfgreg.c +++ b/sys/ia64/pci/pci_cfgreg.c @@ -31,7 +31,7 @@ #include #define SAL_PCI_ADDRESS(bus, slot, func, reg) \ - (((bus) << 23) | ((slot) << 11) | ((func) << 8) | (reg)) + (((bus) << 16) | ((slot) << 11) | ((func) << 8) | (reg)) int pci_cfgregopen(void) @@ -51,9 +51,8 @@ pci_cfgregread(int bus, int slot, int func, int reg, int bytes) return (~0); else return (res.sal_result[0]); - - } + void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { -- cgit v1.1