UBUNTU: SAUCE: PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of
BugLink: https://bugs.launchpad.net/bugs/2072679 Since commitf492edb40b("PCI: vmd: Add quirk to configure PCIe ASPM and LTR"), ASPM is configured for NVMe devices enabled in VMD domain. However, that doesn't cover the case when FADT has ACPI_FADT_NO_ASPM set. So add a new attribute to bypass aspm_disabled so OS can configure ASPM. Fixes:f492edb40b("PCI: vmd: Add quirk to configure PCIe ASPM and LTR") Link: https://lore.kernel.org/linux-pm/218aa81f-9c6-5929-578d-8dc15f83dd48@panix.com/ (cherry picked from https://lore.kernel.org/linux-pci/20240530085227.91168-1-kai.heng.feng@canonical.com/) Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Hui Wang <hui.wang@canonical.com> Acked-by: Aaron Jauregui <aaron.jauregui@canonical.com> Acked-by: Kuan-Ying Lee <kuan-ying.lee@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
ad3a83cfb9
commit
4cfe58fcb2
@@ -1407,8 +1407,12 @@ static int __pci_enable_link_state(struct pci_dev *pdev, int state, bool locked)
|
||||
* the _OSC method), we can't honor that request.
|
||||
*/
|
||||
if (aspm_disabled) {
|
||||
pci_warn(pdev, "can't override BIOS ASPM; OS doesn't have ASPM control\n");
|
||||
return -EPERM;
|
||||
if (aspm_support_enabled && pdev->aspm_os_control)
|
||||
pci_info(pdev, "BIOS can't program ASPM, let OS control it\n");
|
||||
else {
|
||||
pci_warn(pdev, "can't override BIOS ASPM; OS doesn't have ASPM control\n");
|
||||
return -EPERM;
|
||||
}
|
||||
}
|
||||
|
||||
if (!locked)
|
||||
|
||||
@@ -465,6 +465,7 @@ struct pci_dev {
|
||||
unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */
|
||||
unsigned int rom_bar_overlap:1; /* ROM BAR disable broken */
|
||||
unsigned int rom_attr_enabled:1; /* Display of ROM attribute enabled? */
|
||||
unsigned int aspm_os_control:1; /* Display of ROM attribute enabled? */
|
||||
pci_dev_flags_t dev_flags;
|
||||
atomic_t enable_cnt; /* pci_enable_device has been called */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user