Re: [PATCH] PCI/ASPM: Enable L0s/L1 for removable devices when BIOS didn't configure ASPM

From: Bjorn Helgaas

Date: Thu May 14 2026 - 18:54:41 EST


On Thu, May 14, 2026 at 12:14:29PM -0500, Mario Limonciello wrote:
> On 5/6/26 10:27, Bjorn Helgaas wrote:
> > On Wed, May 06, 2026 at 10:10:47AM -0500, Mario Limonciello wrote:
> > > On 5/5/26 23:53, Mika Westerberg wrote:
> > > > On Tue, May 05, 2026 at 08:09:22PM +0200, Rafael J. Wysocki wrote:
> > > > > On Tue, May 5, 2026 at 12:53 AM Mario Limonciello
> > > > > <mario.limonciello@xxxxxxx> wrote:
> > > ...
> >
> > > > > > + * For devicetree platforms, enable L0s and L1 by default.
> > > > > > + *
> > > > > > + * For removable devices (e.g., Thunderbolt/USB4), enable L0s and L1
> > > > > > + * by default if BIOS didn't configure any ASPM states. This handles
> > > > > > + * hotplugged devices where firmware may not have configured ASPM.
> > > > > > + */
> > > >
> > > > Only L1 is supported over TB/USB4 tunnel (no L0s, no L1 substates). The
> > > > PCIe endpoint and the downstream port it connects to of course can support
> > > > the full range as that's a real PCIe link.
> > >
> > > OK - the comment should be updated but I do expect that below code
> > > (link->aspm_support) should remain OK.
> >
> > TB/USB4 are examples of removable devices but they're not the only
> > ones, so I think it's OK for the comment to mention L0s. In fact, it
> > *should* mention L0s since the code below includes L0s, and mentioning
> > only L1 would just be confusing.
> >
> It sounds like you're suggesting no changes to this proposal then, right?

I'm fine with the comment mentioning "L0s and L1", which matches the
code:

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;

Sashiko had several comments. I'm hoping for those to be addressed or
responded to. Unfortunately the complexity of the ASPM code means the
sashiko comments are also very complicated and a lot of work to go
though.