提交 65afe916 编写于 作者: B Bjorn Helgaas

PCI/ACPI: Skip _OSC control tests if _OSC support call failed

If the _OSC support notification fails, we will never request control
(because "support == OSC_PCI_SEGMENT_GROUPS_SUPPORT", which doesn't include
all the features in ACPI_PCIE_REQ_SUPPORT), so we can return early to
simplify the code.
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 1b2a7be6
...@@ -363,7 +363,7 @@ EXPORT_SYMBOL(acpi_pci_osc_control_set); ...@@ -363,7 +363,7 @@ EXPORT_SYMBOL(acpi_pci_osc_control_set);
static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
int *clear_aspm) int *clear_aspm)
{ {
u32 support, base_support, control; u32 support, control;
acpi_status status; acpi_status status;
struct acpi_device *device = root->device; struct acpi_device *device = root->device;
acpi_handle handle = device->handle; acpi_handle handle = device->handle;
...@@ -372,7 +372,7 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, ...@@ -372,7 +372,7 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
* All supported architectures that use ACPI have support for * All supported architectures that use ACPI have support for
* PCI domains, so we indicate this in _OSC support capabilities. * PCI domains, so we indicate this in _OSC support capabilities.
*/ */
support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT; support = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
if (pci_ext_cfg_avail()) if (pci_ext_cfg_avail())
support |= OSC_PCI_EXT_CONFIG_SUPPORT; support |= OSC_PCI_EXT_CONFIG_SUPPORT;
if (pcie_aspm_support_enabled()) if (pcie_aspm_support_enabled())
...@@ -381,10 +381,10 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, ...@@ -381,10 +381,10 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
support |= OSC_PCI_MSI_SUPPORT; support |= OSC_PCI_MSI_SUPPORT;
status = acpi_pci_osc_support(root, support); status = acpi_pci_osc_support(root, support);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
dev_info(&device->dev, "ACPI _OSC support " dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
"notification failed, disabling PCIe ASPM\n"); acpi_format_exception(status));
*no_aspm = 1; *no_aspm = 1;
support = base_support; return;
} }
if (!pcie_ports_disabled if (!pcie_ports_disabled
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册