]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms
authorAndrew Murray <amurray@embedded-bits.co.uk>
Sat, 26 Oct 2013 17:23:25 +0000 (18:23 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 1 Nov 2013 15:25:16 +0000 (09:25 -0600)
The pcie_ports parameter, which defaults to 'auto', allows a user
to specify if PCIe port services are disabled ('compat'), always
enabled ('native'), or only used when allowed by the BIOS
('auto').

Where CONFIG_ACPI isn't enabled, as is often the case for non
x86/ia64 platforms, the 'auto' behavior results in that of
'compat'. Thus in order to use port services on these platforms
'pcie_ports=native' must be added to the kernel command line.

This patch results in the 'native' behavior being followed where
'auto' is selected and ACPI is not enabled.

Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/portdrv_core.c

index 31063ac3099234941e0924e66e2fb4c277deee6d..08d131f7815be99a58890e6f5142479e033bd4cd 100644 (file)
@@ -260,13 +260,14 @@ static int get_port_device_capability(struct pci_dev *dev)
        if (pcie_ports_disabled)
                return 0;
 
-       err = pcie_port_platform_notify(dev, &cap_mask);
-       if (!pcie_ports_auto) {
-               cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP
-                               | PCIE_PORT_SERVICE_VC;
-               if (pci_aer_available())
-                       cap_mask |= PCIE_PORT_SERVICE_AER;
-       } else if (err) {
+       cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP
+                       | PCIE_PORT_SERVICE_VC;
+       if (pci_aer_available())
+               cap_mask |= PCIE_PORT_SERVICE_AER;
+
+       if (pcie_ports_auto) {
+               err = pcie_port_platform_notify(dev, &cap_mask);
+               if (err)
                        return 0;
        }