diff options
| author | Andrew Murray <amurray@embedded-bits.co.uk> | 2013-10-26 13:23:25 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-11-01 11:25:16 -0400 |
| commit | 6b87e700cd65120b70aaa097a8f4e7f22f1945ee (patch) | |
| tree | 7fcf07701f6802cc4f778f2d76f4719b8ac0ac68 | |
| parent | 0394cb192db4397753046775a8caa736397737b5 (diff) | |
PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms
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>
| -rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 31063ac30992..08d131f7815b 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
| @@ -260,13 +260,14 @@ static int get_port_device_capability(struct pci_dev *dev) | |||
| 260 | if (pcie_ports_disabled) | 260 | if (pcie_ports_disabled) |
| 261 | return 0; | 261 | return 0; |
| 262 | 262 | ||
| 263 | err = pcie_port_platform_notify(dev, &cap_mask); | 263 | cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP |
| 264 | if (!pcie_ports_auto) { | 264 | | PCIE_PORT_SERVICE_VC; |
| 265 | cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP | 265 | if (pci_aer_available()) |
| 266 | | PCIE_PORT_SERVICE_VC; | 266 | cap_mask |= PCIE_PORT_SERVICE_AER; |
| 267 | if (pci_aer_available()) | 267 | |
| 268 | cap_mask |= PCIE_PORT_SERVICE_AER; | 268 | if (pcie_ports_auto) { |
| 269 | } else if (err) { | 269 | err = pcie_port_platform_notify(dev, &cap_mask); |
| 270 | if (err) | ||
| 270 | return 0; | 271 | return 0; |
| 271 | } | 272 | } |
| 272 | 273 | ||
