From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Ajay Agarwal <ajayagarwal@google.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Vidya Sagar <vidyas@nvidia.com>,
Nikhil Devshatwar <nikhilnd@google.com>,
Manu Gautam <manugautam@google.com>,
"David E. Box" <david.e.box@linux.intel.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Michael Bottini <michael.a.bottini@linux.intel.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 3/5] PCI/ASPM: Set ASPM_STATE_L1 when driver enables L1ss
Date: Tue, 2 May 2023 18:18:56 -0700 [thread overview]
Message-ID: <7749ee33-04a4-e119-48fc-d78da77fe667@linux.intel.com> (raw)
In-Reply-To: <20230502193140.1062470-4-ajayagarwal@google.com>
On 5/2/23 12:31 PM, Ajay Agarwal wrote:
> Currently the aspm driver does not set ASPM_STATE_L1 bit in
> aspm_default when the caller requests L1SS ASPM state. This will
> lead to pcie_config_aspm_link() not enabling the requested L1SS
> state. Set ASPM_STATE_L1 when driver enables L1ss.
>
Is there a bug associated with this issue?
> Signed-off-by: Ajay Agarwal <ajayagarwal@google.com>
> ---
> Changelog since v1:
> - Break down the L1 and L1ss handling into separate patches
>
> drivers/pci/pcie/aspm.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 4ad0bf5d5838..7c9935f331f1 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -1171,14 +1171,15 @@ int pci_enable_link_state(struct pci_dev *pdev, int state)
> link->aspm_default |= ASPM_STATE_L0S;
> if (state & PCIE_LINK_STATE_L1)
> link->aspm_default |= ASPM_STATE_L1;
> + /* L1 PM substates require L1 */
> if (state & PCIE_LINK_STATE_L1_1)
> - link->aspm_default |= ASPM_STATE_L1_1;
> + link->aspm_default |= ASPM_STATE_L1_1 | ASPM_STATE_L1;
> if (state & PCIE_LINK_STATE_L1_2)
> - link->aspm_default |= ASPM_STATE_L1_2;
> + link->aspm_default |= ASPM_STATE_L1_2 | ASPM_STATE_L1;
> if (state & PCIE_LINK_STATE_L1_1_PCIPM)
> - link->aspm_default |= ASPM_STATE_L1_1_PCIPM;
> + link->aspm_default |= ASPM_STATE_L1_1_PCIPM | ASPM_STATE_L1;
> if (state & PCIE_LINK_STATE_L1_2_PCIPM)
> - link->aspm_default |= ASPM_STATE_L1_2_PCIPM;
> + link->aspm_default |= ASPM_STATE_L1_2_PCIPM | ASPM_STATE_L1;
> pcie_config_aspm_link(link, policy_to_aspm_state(link));
>
> link->clkpm_default = (state & PCIE_LINK_STATE_CLKPM) ? 1 : 0;
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
next prev parent reply other threads:[~2023-05-03 1:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 19:31 [PATCH v2 0/5] ASPM: aspm_disable/default state handling fixes Ajay Agarwal
2023-05-02 19:31 ` [PATCH v2 1/5] PCI/ASPM: Disable ASPM_STATE_L1 only when class driver disables L1 ASPM Ajay Agarwal
2023-05-03 1:10 ` Sathyanarayanan Kuppuswamy
2023-05-04 8:28 ` Ajay Agarwal
2023-05-02 19:31 ` [PATCH v2 2/5] PCI/ASPM: Set ASPM_STATE_L1 only when driver enables L1.0 Ajay Agarwal
2023-05-03 1:17 ` Sathyanarayanan Kuppuswamy
2023-05-04 8:30 ` Ajay Agarwal
2023-05-02 19:31 ` [PATCH v2 3/5] PCI/ASPM: Set ASPM_STATE_L1 when driver enables L1ss Ajay Agarwal
2023-05-03 1:18 ` Sathyanarayanan Kuppuswamy [this message]
2023-05-04 8:31 ` Ajay Agarwal
2023-05-02 19:31 ` [PATCH v2 4/5] PCI/ASPM: Rename L1.2 specific functions Ajay Agarwal
2023-05-02 19:31 ` [PATCH v2 5/5] PCI/ASPM: Remove unnecessary ASPM_STATE_L1SS check Ajay Agarwal
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=7749ee33-04a4-e119-48fc-d78da77fe667@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=ajayagarwal@google.com \
--cc=bhelgaas@google.com \
--cc=david.e.box@linux.intel.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-pci@vger.kernel.org \
--cc=manugautam@google.com \
--cc=michael.a.bottini@linux.intel.com \
--cc=nikhilnd@google.com \
--cc=vidyas@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.