diff options
author | marcel <marcel@FreeBSD.org> | 2013-07-23 03:03:17 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-07-23 03:03:17 +0000 |
commit | d50608e9d480e9bbbc64315082cc278266806d00 (patch) | |
tree | fc2bd2f293b62e8e62143995f14a41b9b67ea400 /sys/ia64 | |
parent | 04d34b86e0a3a3f9916fb374589ec2be12487fe1 (diff) | |
download | FreeBSD-src-d50608e9d480e9bbbc64315082cc278266806d00.zip FreeBSD-src-d50608e9d480e9bbbc64315082cc278266806d00.tar.gz |
In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
bus number into the bus argument. The bus number occupies the least
significant 8 bits. The PCI domain occupies the most significant 24
bits.
On the Altix 350, the PCI domain is a required parameter, but
changing the prototype of the pci_cfgreg*() functions to include a
separate domain argument has wide-spread consequences across the
supported architectures. We'd be changing a known interface.
Multiplexing is an acceptable kluge to give us what we need with
manageable impact. Note that the PCI bus number fits in 8 bits,
so the multiplexing of the domain is a backward compatible change.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/pci/pci_cfgreg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ia64/pci/pci_cfgreg.c b/sys/ia64/pci/pci_cfgreg.c index 00d8397..e3f472b 100644 --- a/sys/ia64/pci/pci_cfgreg.c +++ b/sys/ia64/pci/pci_cfgreg.c @@ -70,7 +70,7 @@ pci_cfgregread(int bus, int slot, int func, int reg, int len) register_t is; u_long addr; - addr = pci_sal_address(0, bus, slot, func, reg); + addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg); if (addr == ~0ul) return (~0); @@ -91,7 +91,7 @@ pci_cfgregwrite(int bus, int slot, int func, int reg, uint32_t data, int len) register_t is; u_long addr; - addr = pci_sal_address(0, bus, slot, func, reg); + addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg); if (addr == ~0ul) return; |