Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev,
	ilpo.jarvinen@linux.intel.com, david.e.box@linux.intel.com,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: [PATCH 2/2] PCI: vmd: Let OS control ASPM for devices under VMD domain
Date: Thu, 30 May 2024 16:52:27 +0800	[thread overview]
Message-ID: <20240530085227.91168-2-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20240530085227.91168-1-kai.heng.feng@canonical.com>

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/
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/pci/controller/vmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 87b7856f375a..1dbc525c473f 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);
-- 
2.43.0


  reply	other threads:[~2024-05-30  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30  8:52 [PATCH 1/2] PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of Kai-Heng Feng
2024-05-30  8:52 ` Kai-Heng Feng [this message]
2024-08-02  0:04   ` [PATCH 2/2] PCI: vmd: Let OS control ASPM for devices under VMD domain Bjorn Helgaas
2024-08-02  1:04     ` Kai-Heng Feng
2024-08-16  6:17       ` Kai-Heng Feng
2024-07-26  7:22 ` [PATCH 1/2] PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of Hui Wang
2024-08-16 22:28 ` Bjorn Helgaas
2024-08-19  5:31   ` Kai-Heng Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240530085227.91168-2-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jonathan.derrick@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nirmal.patel@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox