public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: bhelgaas@google.com, 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
Subject: Re: [PATCH 2/2] PCI: vmd: Let OS control ASPM for devices under VMD domain
Date: Thu, 1 Aug 2024 19:04:14 -0500	[thread overview]
Message-ID: <20240802000414.GA127813@bhelgaas> (raw)
In-Reply-To: <20240530085227.91168-2-kai.heng.feng@canonical.com>

On Thu, May 30, 2024 at 04:52:27PM +0800, Kai-Heng Feng wrote:
> 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")

I assume f492edb40b54 was tested and worked at the time.  Is the
implication that newer Intel SoCs have added more requirements for
getting to low power states, since __pci_enable_link_state() would
have warned and done nothing even then?

Or maybe this is a new system that sets ACPI_FADT_NO_ASPM, and
f492edb40b54 was tested on systems that did *not* set
ACPI_FADT_NO_ASPM?

> 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-08-02  0:04 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 ` [PATCH 2/2] PCI: vmd: Let OS control ASPM for devices under VMD domain Kai-Heng Feng
2024-08-02  0:04   ` Bjorn Helgaas [this message]
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=20240802000414.GA127813@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jonathan.derrick@linux.dev \
    --cc=kai.heng.feng@canonical.com \
    --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