[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251112204658.GA2242023@bhelgaas>
Date: Wed, 12 Nov 2025 14:46:58 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: linux-pci@...r.kernel.org, Christian Zigotzky <chzigotzky@...osoft.de>,
mad skateman <madskateman@...il.com>,
"R. T. Dickinson" <rtd2@...a.co.nz>,
Darren Stevens <darren@...vens-zone.net>,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Lukas Wunner <lukas@...ner.de>,
luigi burdo <intermediadc@...mail.com>, Al <al@...azap.net>,
Hongxing Zhu <hongxing.zhu@....com>, hypexed@...oo.com.au,
linuxppc-dev@...ts.ozlabs.org, debian-powerpc@...ts.debian.org,
linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH v2 2/4] PCI/ASPM: Add pcie_aspm_remove_cap() to override
advertised link states
[-cc Roland]
On Wed, Nov 12, 2025 at 10:57:07PM +0530, Manivannan Sadhasivam wrote:
> On Mon, Nov 10, 2025 at 04:22:26PM -0600, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@...gle.com>
> >
> > Add pcie_aspm_remove_cap(). A quirk can use this to prevent use of ASPM
> > L0s or L1 link states, even if the device advertised support for them.
> > +void pcie_aspm_remove_cap(struct pci_dev *pdev, u32 lnkcap)
> > +{
> > + if (lnkcap & PCI_EXP_LNKCAP_ASPM_L0S)
> > + pdev->aspm_l0s_support = 0;
> > + if (lnkcap & PCI_EXP_LNKCAP_ASPM_L1)
> > + pdev->aspm_l1_support = 0;
> > +
> > + pci_info(pdev, "ASPM:%s%s removed from Link Capabilities to avoid device defect\n",
> > + lnkcap & PCI_EXP_LNKCAP_ASPM_L0S ? " L0s" : "",
> > + lnkcap & PCI_EXP_LNKCAP_ASPM_L1 ? " L1" : "");
>
> I think this gives a false impression that the ASPM CAPs are being
> removed from the LnkCap register. This function is just removing it
> from the internal cache and the LnkCap register is left unchanged.
Very true, this is confusing since we're not actually changing the
LnkCap register, so lspci etc will still show these states as
supported. The quirk needs to work for arbitrary devices, and there's
no generic way to change LnkCap, so the quirk can't do that.
Any ideas for better wording? I don't like "disable" because that
suggests that we're clearing bits in LnkCtl.
"L0s L1 in Link Capabilities will be ignored ..."?
"ignoring Link Capabilities L0s L1 ..."?
"L0s L1 treated as unsupported ..."?
Powered by blists - more mailing lists