diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-03 06:09:22 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-06-03 06:09:22 +0000 |
commit | e23853693cbfa8b010baaa91e76b935af372ce86 (patch) | |
tree | 9d839b34853cfcb1264f92e2469da1d66c7337ba /sys/dev | |
parent | 8fe82d00a3725c9f4e47cc8fe900bd088ed42a55 (diff) |
Whack conflicting BARs, such that they get assigned a non-conflicting value
when we try to map it.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 8f292474458..adb0b397b99 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.61 2009/05/05 14:16:17 kettenis Exp $ */ +/* $OpenBSD: pci.c,v 1.62 2009/06/03 06:09:21 kettenis Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -557,15 +557,21 @@ pci_reserve_resources(struct pci_attach_args *pa) } #endif if (pa->pa_memex && extent_alloc_region(pa->pa_memex, - base, size, EX_NOWAIT)) + base, size, EX_NOWAIT)) { printf("mem address conflict 0x%x/0x%x\n", base, size); + pci_conf_write(pc, tag, reg, 0); + if (type & PCI_MAPREG_MEM_TYPE_64BIT) + pci_conf_write(pc, tag, reg + 4, 0); + } break; case PCI_MAPREG_TYPE_IO: if (pa->pa_ioex && extent_alloc_region(pa->pa_ioex, - base, size, EX_NOWAIT)) + base, size, EX_NOWAIT)) { printf("io address conflict 0x%x/0x%x\n", base, size); + pci_conf_write(pc, tag, reg, 0); + } break; } |