Re: [PATCH v3] PCI: Skip Target Speed quirk on clamped ports with no link
From: Thorsten Leemhuis
Date: Mon Sep 21 2026 - 06:37:39 EST
On 9/18/26 12:39, Maciej W. Rozycki wrote:
> On Fri, 18 Sep 2026, Thorsten Leemhuis wrote:
>
>>> But IIUC Aoxtj still sees issues with 72780f796468 ("PCI: Always lift
>>> 2.5GT/s restriction in PCIe failed link retraining") even with this
>>> patch
>>> (https://lore.kernel.org/all/331e97c7-e422-420d-9f3e-5d9f734464b3@xxxxxxxxxxx)
>>>
>>> And M M / Mich (BCC'd) also reports an issue that (IIUC) is not fixed by
>>> this patch (https://bugzilla.kernel.org/show_bug.cgi?id=221919#c3)
>>>
>>> So evidently there are still issues but maybe this patch fixes part of
>>> them?
>>>> Yeah, Maciej ten days expressed that we to look into this. Anyway, I
>> suggest someone that is affected by that problem starts a new thread
>> (please CC all those that are affected by it and the regression list)
>> with summarizing the current state + this patch, as this thread got a
>> bit confusing... (please drop a link to that thread here afterwards)
>
> It remains on my radar, no worries. [...]
FWIW, another report from "blaat windows" (now CCed) can be found
out-of-thread here:
https://lore.kernel.org/all/AS2PR10MB7429335B6C8F4C7FA3F88638B5852@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Quoting that below.
"""
>>>> Another reproducible case of the active-link failure described in this thread.
>>>>
>>>> Hardware:
>>>> Intel 4th-gen/9-series platform
>>>> Intel 82571EB quad-port NIC
>>>> Microsemi/PMC/IDT PES12N3A PCIe switch
>>>> Root port 00:1c.4, LnkCap 5GT/s x4
>>>> Working negotiated link: 2.5GT/s x4
>>>>
>>>> Kernel results:
>>>> 7.2-rc1 fail
>>>> 7.1-rc7 succes
>>>>
>>>> On failing kernels, the PES12N3A hierarchy does not enumerate and all four downstream 82571EB ports disappear.
>>>>
>>>> I traced this to pcie_failed_link_retrain() and specifically the new generic clamp-removal code introduced by 72780f7964684939d7d2f69c348876213b184484 ("PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining").
>>>>
>>>> I tested 7.3.0-rc3+ with only this block commented out:
>>>>
>>>> pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &lnkctl2);
>>>> if ((lnkctl2 & PCI_EXP_LNKCTL2_TLS) == PCI_EXP_LNKCTL2_TLS_2_5GT) {
>>>> pci_info(dev, "removing 2.5GT/s downstream link speed restriction\n");
>>>> ret = pcie_set_target_speed(dev, speed_cap, false);
>>>> if (ret)
>>>> goto err;
>>>> }
>>>>
>>>> With that block disabled, 7.3.0-rc3+ boots normally, having all four NIC ports enumerate:
>>>>
>>>> 07:00.0 82571EB
>>>> 07:00.1 82571EB
>>>> 08:00.0 82571EB
>>>> 08:00.1 82571EB
>>>>
>>>> The important result is that the initial 2.5GT/s recovery is fine. Leaving the link at 2.5GT/s works. It is the subsequent:
>>>>
>>>> pcie_set_target_speed(dev, speed_cap, false);
>>>>
>>>> which breaks this PES12N3A/82571EB link.
>>>>
>>>> So this appears to be the same active-link failure mode, but with a PES12N3A switch rather than a direct 82571EB connection.
>>>>
>>>> This was tested against vanilla 7.3.0-rc3+ with only the above local change.
>>>>
>>>> I can provide full dmesg/lspci output and test a proposed fix if useful.
"""
Ciao, Thorsten