Skip to content

Instantly share code, notes, and snippets.

@harrykipper
Created November 13, 2017 16:03
Show Gist options
  • Save harrykipper/2c2884938cf7484c647e8aa6f0abd089 to your computer and use it in GitHub Desktop.
Save harrykipper/2c2884938cf7484c647e8aa6f0abd089 to your computer and use it in GitHub Desktop.
Prevent the kernel from disabling ASPM
diff -rupN linux-4.10-orig/drivers/acpi/pci_root.c linux-4.10/drivers/acpi/pci_root.c
--- linux-4.10-orig/drivers/acpi/pci_root.c 2017-04-03 11:16:04.296665638 +0200
+++ linux-4.10/drivers/acpi/pci_root.c 2017-04-03 11:17:21.696665034 +0200
@@ -494,13 +494,13 @@ static void negotiate_os_control(struct
* it's unsupported. Leave existing configuration
* intact and prevent the OS from touching it.
*/
- dev_info(&device->dev, "FADT indicates ASPM is unsupported, using BIOS configuration\n");
- *no_aspm = 1;
+ dev_info(&device->dev, "FADT indicates ASPM is unsupported, not caring and keeping ASPM\n");
+ *no_aspm = 0;
}
} else {
decode_osc_control(root, "OS requested", requested);
decode_osc_control(root, "platform willing to grant", control);
- dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
+ dev_info(&device->dev, "_OSC failed (%s); keeping ASPM on anyway\n",
acpi_format_exception(status));
/*
@@ -510,7 +510,7 @@ static void negotiate_os_control(struct
* flag here, to defer the action until after the ACPI
* root scan.
*/
- *no_aspm = 1;
+ *no_aspm = 0;
}
}
diff -rupN linux-4.10-orig/drivers/pci/pci-acpi.c linux-4.10/drivers/pci/pci-acpi.c
--- linux-4.10-orig/drivers/pci/pci-acpi.c 2017-04-03 11:16:04.696665635 +0200
+++ linux-4.10/drivers/pci/pci-acpi.c 2017-04-03 11:17:47.266664834 +0200
@@ -863,8 +863,7 @@ static int __init acpi_pci_init(void)
}
if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
- pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
- pcie_no_aspm();
+ pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, we keep it anyway\n");
}
ret = register_acpi_bus_type(&acpi_pci_bus);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment