Re: [PATCH v2 2/4] PCI/ASPM: Add pcie_aspm_remove_cap() to override advertised link states
- To: Bjorn Helgaas <helgaas@kernel.org>
- Cc: Manivannan Sadhasivam <mani@kernel.org>, linux-pci@vger.kernel.org, Christian Zigotzky <chzigotzky@xenosoft.de>, mad skateman <madskateman@gmail.com>, "R. T. Dickinson" <rtd2@xtra.co.nz>, Darren Stevens <darren@stevens-zone.net>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, Lukas Wunner <lukas@wunner.de>, luigi burdo <intermediadc@hotmail.com>, Al <al@datazap.net>, Hongxing Zhu <hongxing.zhu@nxp.com>, hypexed@yahoo.com.au, linuxppc-dev@lists.ozlabs.org, debian-powerpc@lists.debian.org, linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
- Subject: Re: [PATCH v2 2/4] PCI/ASPM: Add pcie_aspm_remove_cap() to override advertised link states
- From: "Maciej W. Rozycki" <macro@orcam.me.uk>
- Date: Thu, 13 Nov 2025 04:02:39 +0000 (GMT)
- Message-id: <[🔎] alpine.DEB.2.21.2511130354500.25436@angie.orcam.me.uk>
- In-reply-to: <[🔎] 20251112204658.GA2242023@bhelgaas>
- References: <[🔎] 20251112204658.GA2242023@bhelgaas>
On Wed, 12 Nov 2025, Bjorn Helgaas wrote:
> > > + 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.
There's no way to poke at hw, but that is only relevant for x86 I believe
and not the default access method for `lspci' anyway. For sysfs we do it
already for things such as fixing the device class; cf. `quirk_isa_bridge'
(arch/alpha/kernel/pci.c), so why is it a problem here? Unless we want to
keep it for `lspci' actually.
Maciej
Reply to: