rtlwifi: rtl8192c: Fix W=1 warning
[pandora-kernel.git] / drivers / acpi / pci_root.c
index 2672c79..5b0f075 100644 (file)
@@ -247,8 +247,8 @@ static acpi_status acpi_pci_query_osc(struct acpi_pci_root *root,
                *control &= OSC_PCI_CONTROL_MASKS;
                capbuf[OSC_CONTROL_TYPE] = *control | root->osc_control_set;
        } else {
-               /* Run _OSC query for all possible controls. */
-               capbuf[OSC_CONTROL_TYPE] = OSC_PCI_CONTROL_MASKS;
+               /* Run _OSC query only with existing controls. */
+               capbuf[OSC_CONTROL_TYPE] = root->osc_control_set;
        }
 
        status = acpi_pci_run_osc(root->device->handle, capbuf, &result);
@@ -596,6 +596,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
                if (ACPI_SUCCESS(status)) {
                        dev_info(root->bus->bridge,
                                "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(root->bus->bridge,
                                "ACPI _OSC request failed (%s), "