From 7a00254565eb5099b46b95a3f02f72063683410c Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 11 Feb 2019 20:47:09 +0000 Subject: [PATCH] Enable PCI BAR reallocation by default. When pci_realloc_bars was first added, the intention was to eventually enable it by default, but it was left disabled to preserve existing behavior. The setting is pretty conservative in that it does not attempt to allocate resources for BARs that the BIOS/firmware leaves disabled. It only attempts to reallocate resources for a BAR that the firmware programmed during boot but that conflicts with another resource during the kernel's device scan. PR 221350 is an example of a machine that this knob fixes. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D18965 --- sys/dev/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 5474c8a66140..3e74436e5e50 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -341,7 +341,7 @@ SYSCTL_INT(_hw_pci, OID_AUTO, enable_io_modes, CTLFLAG_RWTUN, " enable these bits correctly. We'd like to do this all the time, but" " there are some peripherals that this causes problems with."); -static int pci_do_realloc_bars = 0; +static int pci_do_realloc_bars = 1; SYSCTL_INT(_hw_pci, OID_AUTO, realloc_bars, CTLFLAG_RWTUN, &pci_do_realloc_bars, 0, "Attempt to allocate a new range for any BARs whose original "