Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
	Christian Zigotzky <chzigotzky@xenosoft.de>,
	FUKAUMI Naoki <naoki@radxa.com>,
	linux-rockchip@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] PCI/ASPM: Enable only L0s and L1 for devicetree platforms
Date: Tue, 21 Oct 2025 10:39:40 -0500	[thread overview]
Message-ID: <20251021153940.GA1191128@bhelgaas> (raw)
In-Reply-To: <2wv7662f23seqtifn4zkud6xlecfhpeso4rn72syn6q2ts6sm5@cllw6gyv2xwx>

On Tue, Oct 21, 2025 at 06:05:07PM +0530, Manivannan Sadhasivam wrote:
> On Tue, Oct 21, 2025 at 09:31:32AM +0530, Manivannan Sadhasivam wrote:
> > On Mon, Oct 20, 2025 at 05:12:07PM -0500, Bjorn Helgaas wrote:

> > > +		if (link->aspm_support & PCIE_LINK_STATE_L0S)
> > > +			link->aspm_default |= PCIE_LINK_STATE_L0S;
> > > +		if (link->aspm_support & PCIE_LINK_STATE_L1)
> > > +			link->aspm_default |= PCIE_LINK_STATE_L1;
> > 
> > Not sure if it is worth setting these states conditionally. Link
> > state enablement code should make use of the cached ASPM cap in
> > 'link->aspm_capable'.
> 
> I see the point now. Without the check, we falsely claim that the
> ASPM states are getting enabled. But we cannot be sure until the
> register write to LNKCTL happens, which will depend on many factors
> (own device capability, upstream/downstream port capability,...)
> 
> To avoid ambiguity, can we reword the log to something like,
> 
> 	"ASPM: Overridding default states %s%s\n"

I think aspm_support already includes the capabilities from both ends
of the link:

        if (parent_lnkcap & child_lnkcap & PCI_EXP_LNKCAP_ASPM_L0S)
                link->aspm_support |= PCIE_LINK_STATE_L0S;

        if (parent_lnkcap & child_lnkcap & PCI_EXP_LNKCAP_ASPM_L1)
                link->aspm_support |= PCIE_LINK_STATE_L1;

  reply	other threads:[~2025-10-21 15:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 22:12 [PATCH] PCI/ASPM: Enable only L0s and L1 for devicetree platforms Bjorn Helgaas
2025-10-21  4:01 ` Manivannan Sadhasivam
2025-10-21 12:35   ` Manivannan Sadhasivam
2025-10-21 15:39     ` Bjorn Helgaas [this message]
2025-10-21 15:36   ` Bjorn Helgaas
2025-10-22 19:13 ` Bjorn Helgaas
2025-10-23  4:18   ` FUKAUMI Naoki
2025-10-23  4:25   ` [RESEND] " FUKAUMI Naoki
2025-10-23  5:01     ` FUKAUMI Naoki
2025-10-23  9:30       ` Herve Codina
2025-10-23  5:03     ` Manivannan Sadhasivam
2025-10-23  6:12 ` FUKAUMI Naoki
  -- strict thread matches above, loose matches on Subject: below --
2025-10-23 18:06 Bjorn Helgaas
2025-10-23 18:25 ` Bjorn Helgaas
2025-10-23 19:59   ` Diederik de Haas
2025-10-23 20:39     ` Bjorn Helgaas
2025-10-24  4:28   ` Christian Zigotzky
2025-10-23 18:27 ` Dragan Simic
2025-10-23 20:37   ` Bjorn Helgaas
2025-10-24 15:12 ` Johan Hovold
2025-10-24 15:20   ` Johan Hovold
2025-10-24 20:39     ` Bjorn Helgaas
2025-10-27 10:00       ` Johan Hovold
2025-10-27 17:12       ` Christian Zigotzky
2025-10-28 23:33         ` Bjorn Helgaas
2025-10-29  5:47           ` Christian Zigotzky
2025-10-29 15:59             ` Bjorn Helgaas
2025-10-29 17:25             ` Bjorn Helgaas

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=20251021153940.GA1191128@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=chzigotzky@xenosoft.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=naoki@radxa.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