diff options
author | 2009-06-03 06:09:21 +0000 | |
---|---|---|
committer | 2009-06-03 06:09:21 +0000 | |
commit | 207e26571b9618b10feee1b04e82c7fd761cf4e6 (patch) | |
tree | 1009c80513c0edb73e70e8c67c43ad249f1f3f8b | |
parent | make sure timezone and sets location gets sane defaults (diff) | |
download | wireguard-openbsd-207e26571b9618b10feee1b04e82c7fd761cf4e6.tar.xz wireguard-openbsd-207e26571b9618b10feee1b04e82c7fd761cf4e6.zip |
Whack conflicting BARs, such that they get assigned a non-conflicting value
when we try to map it.
-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; } |