From deec1ca8eb80cea58beadb1404abb163426956f3 Mon Sep 17 00:00:00 2001
From: Yijing Wang <wangyijing@huawei.com>
Date: Tue, 28 May 2013 16:02:55 +0800
Subject: [PATCH] PCI: move pcie_clear_aspm() out of ACPI_SUCCESS() checking
We should move pcie_clear_aspm() out of ACPI_SUCCESS() checking
in acpi_pci_root_add(), because if FADT dictate no aspm support,
and acpi_pci_osc_control_set() get _OSC control fail. We will
miss aspm clear here.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
drivers/acpi/pci_root.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
@@ -506,13 +506,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
if (ACPI_SUCCESS(status)) {
dev_info(&device->dev,
"ACPI _OSC control (0x%02x) granted\n", flags);
- if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
- /*
- * We have ASPM control, but the FADT indicates
- * that it's unsupported. Clear it.
- */
- pcie_clear_aspm(root->bus);
- }
} else {
dev_info(&device->dev,
"ACPI _OSC request failed (%s), "
@@ -522,6 +515,13 @@ static int acpi_pci_root_add(struct acpi_device *device,
"disabling ASPM\n");
pcie_no_aspm();
}
+ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
+ /*
+ * We have ASPM control, but the FADT indicates
+ * that it's unsupported. Clear it.
+ */
+ pcie_clear_aspm(root->bus);
+ }
} else {
dev_info(&device->dev,
"Unable to request _OSC control "
--
1.7.1