Re: [PATCH] PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining

From: Maciej W. Rozycki
Date: Mon Dec 08 2025 - 14:26:54 EST


On Mon, 1 Dec 2025, Maciej W. Rozycki wrote:

> > > + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap);
> > > + if ((lnkctl2 & PCI_EXP_LNKCTL2_TLS) == PCI_EXP_LNKCTL2_TLS_2_5GT &&
> > > + (lnkcap & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKCAP_SLS_2_5GB) {
> >
> > I'm trying to recall, if there was some particular reason why
> > ->supported_speeds couldn't be used in this function. It would avoid the
> > need to read LinkCap at all.
>
> Thanks for the hint. There's probably none and it's just me missing some
> of the zillion bits and pieces. I'll wait a couple of days for any other
> people to chime in and respin with this update included if everyone is
> otherwise happy to proceed with this update.

I take it no further feedback will be gathered, so I've sent v2 now, but
I've figured out backporting v1 as it is will result in less intrusion to
the trunk commit, so I have only made a change to use `->supported_speeds'
a follow-up patch in a series. Please let me know if this works for you.

Maciej