diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-01 12:26:16 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-01 12:26:16 +0000 |
commit | 77221e0533bc2d2776aaa14d8cb0a350c41e91a1 (patch) | |
tree | 58fe439f71bb81832d7ccbc43cf7405f413aa228 /sys/arch/sparc64/dev | |
parent | 41f8f990efc8d5dfec2fd2d609f1a001c4ee64c5 (diff) |
Shift tags when converting them into an address offset. Necessary to support
access to PCIe config space, which is larger than normal PCI config space.
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r-- | sys/arch/sparc64/dev/pci_machdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index 61b0b29be2b..ec4436ace0c 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.26 2006/07/10 21:38:01 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.27 2007/04/01 12:26:15 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -367,7 +367,7 @@ pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) (long)PCITAG_OFFSET(tag), reg)); if (PCITAG_NODE(tag) != -1) { val = bus_space_read_4(pc->bustag, pc->bushandle, - PCITAG_OFFSET(tag) + reg); + (PCITAG_OFFSET(tag) << pc->tagshift) + reg); } else DPRINTF(SPDB_CONF, ("pci_conf_read: bogus pcitag %x\n", (int)PCITAG_OFFSET(tag))); @@ -389,7 +389,7 @@ pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) } bus_space_write_4(pc->bustag, pc->bushandle, - PCITAG_OFFSET(tag) + reg, data); + (PCITAG_OFFSET(tag) << pc->tagshift) + reg, data); } /* |