Module Name: src Committed By: jmcneill Date: Mon Aug 30 22:49:03 UTC 2021
Modified Files: src/sys/dev/pci: pciconf.c Log Message: If an allocation cannot be satisfied by the prefetchable range, retry with the non-prefetchable range. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/pciconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/pciconf.c diff -u src/sys/dev/pci/pciconf.c:1.52 src/sys/dev/pci/pciconf.c:1.53 --- src/sys/dev/pci/pciconf.c:1.52 Sun Jan 3 10:31:37 2021 +++ src/sys/dev/pci/pciconf.c Mon Aug 30 22:49:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pciconf.c,v 1.52 2021/01/03 10:31:37 skrll Exp $ */ +/* $NetBSD: pciconf.c,v 1.53 2021/08/30 22:49:03 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.52 2021/01/03 10:31:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.53 2021/08/30 22:49:03 jmcneill Exp $"); #include "opt_pci.h" @@ -1012,6 +1012,11 @@ setup_memwins(pciconf_bus_t *pb) pm->address = pci_allocate_range(r, pm->size, pm->align, ok64); + if (~pm->address == 0 && r == &pb->pmem_res) { + r = &pb->mem_res; + pm->address = pci_allocate_range(r, pm->size, + pm->align, ok64); + } if (~pm->address == 0) { print_tag(pd->pc, pd->tag); printf(