diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-03-09 20:21:30 +0300 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-03-31 01:26:58 +0300 |
commit | d850882b726f6db01b0792151e72e69b234aa461 (patch) | |
tree | 98f978f5570c10d7c9e23106428e291181876679 /drivers/pci/pcie/portdrv_pci.c | |
parent | 842b447f0074b93e9f7db60039fdc72ec14bef9a (diff) | |
download | linux-d850882b726f6db01b0792151e72e69b234aa461.tar.xz |
PCI/portdrv: Rename and reverse sense of pcie_ports_auto
The platform may restrict the OS's use of PCIe services, e.g., via the ACPI
_OSC method. The user may use "pcie_ports=native" to force the port driver
to use PCIe services even if the platform asked us not to.
The "pcie_ports=native" parameter determines the setting of
pcie_ports_auto. Rename this to pcie_ports_native and reverse the
sense to simplify the code.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie/portdrv_pci.c')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 8b62192342ac..8e4260d25941 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -25,19 +25,18 @@ bool pcie_ports_disabled; /* - * If this switch is set, ACPI _OSC will be used to determine whether or not to - * enable PCIe port native services. + * If the user specified "pcie_ports=native", use the PCIe services regardless + * of whether the platform has given us permission. On ACPI systems, this + * means we ignore _OSC. */ -bool pcie_ports_auto = true; +bool pcie_ports_native; static int __init pcie_port_setup(char *str) { - if (!strncmp(str, "compat", 6)) { + if (!strncmp(str, "compat", 6)) pcie_ports_disabled = true; - } else if (!strncmp(str, "native", 6)) { - pcie_ports_disabled = false; - pcie_ports_auto = false; - } + else if (!strncmp(str, "native", 6)) + pcie_ports_native = true; return 1; } |