diff mbox series

[SRU,N/O/unstable,v2,2/2] UBUNTU: SAUCE: PCI: vmd: Let OS control ASPM for devices under VMD domain

Message ID 20240819025908.50667-3-hui.wang@canonical.com
State New
Headers show
Series Enable ASPM for nvme controller when working in RAID on mode | expand

Commit Message

Hui Wang Aug. 19, 2024, 2:59 a.m. UTC
From: Kai-Heng Feng <kai.heng.feng@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/2072679

Intel SoC cannot reach lower power states when mapped VMD PCIe bridges
and NVMe devices don't have ASPM configured.

So set aspm_os_control attribute to let OS really enable ASPM for those
devices.

Fixes: f492edb40b54 ("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-2-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>
---
 drivers/pci/controller/vmd.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index c9c200adefd2..e33d213a34fb 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -751,6 +751,8 @@  static int vmd_pm_enable_quirk(struct pci_dev *pdev, void *userdata)
 	if (!(features & VMD_FEAT_BIOS_PM_QUIRK))
 		return 0;
 
+	pdev->aspm_os_control = 1;
+
 	pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL);
 
 	pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);