summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-07-23 19:29:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-07-23 19:29:59 +0000
commitc5731045524945a5f5f72d7842dbaeb97ba11158 (patch)
tree72e00737c249dbd8bd5afbfaafd9998629381955 /sys/dev/pci
parentf0cf0f8f1828e39015d36394b5ad80b93e4d3782 (diff)
Avoid twiddling the lower bits of a BAR such that the code becomes usable
for mapping ROM BARs.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_map.c b/sys/dev/pci/pci_map.c
index ae9677bf686..33d3cb0e404 100644
--- a/sys/dev/pci/pci_map.c
+++ b/sys/dev/pci/pci_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_map.c,v 1.24 2009/04/06 20:51:48 kettenis Exp $ */
+/* $OpenBSD: pci_map.c,v 1.25 2009/07/23 19:29:58 kettenis Exp $ */
/* $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $ */
/*-
@@ -152,7 +152,7 @@ obsd_pci_mem_find(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t type,
pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
csr & ~PCI_COMMAND_MEM_ENABLE);
address = pci_conf_read(pc, tag, reg);
- pci_conf_write(pc, tag, reg, 0xffffffff);
+ pci_conf_write(pc, tag, reg, PCI_MAPREG_MEM_ADDR_MASK);
mask = pci_conf_read(pc, tag, reg);
pci_conf_write(pc, tag, reg, address);
if (is64bit) {