Re: [PATCH v3] PCI: Skip Target Speed quirk on clamped ports with no link
Aoxtj <[email protected]>
| Newsgroups | org.kernel.vger.linux-pci,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm the one who reported a PCIe/NVMe boot regression on the Proxmox forum:
https://forum.proxmox.com/threads/7-0-14-7-kernel-breaks-pci-link-training.185549/
A Proxmox dev pointed me here and asked me to try this patch. I'm not a
kernel developer and did most of the debugging with AI help, so please
bear with me.
TL;DR:
- Proxmox Kernel 7.0.14-6 to 7.0.14-8: SK hynix system drive disappears
during boot.
- Narrowed down to commit 72780f796468 and verified by reverting it.
- 7.0.14-8 + revert 72780f796468: boots reliably.
- 7.0.14-8 + this v3 patch: only boots sometimes; failed boots lose the
drive the same way.
Machine: ASRock B450M Pro4-F, SK hynix PE4010 NVMe system drive on a
passive PCIe bifurcation card.
AMD Renoir PCIe GPP Bridge 0000:00:02.4 [1022:1633]
-> bus 07 -> SK hynix PE4010 0000:07:00.0 [1c5c:2527]
Initramfs dmesg from a failed v3 boot:
[ 0.555805] pci 0000:00:02.4: [1022:1633] type 01 class 0x060400
PCIe Root Port
[ 0.555828] pci 0000:00:02.4: PCI bridge to [bus 07]
[ 0.555871] pci 0000:00:02.4: removing 2.5GT/s downstream link
speed restriction
[ 1.636965] pci 0000:00:02.4: retraining failed
Nothing shows up on bus 07 afterwards, so my system drive is gone.
With the revert instead, the working link reports:
Root Port 0000:00:02.4:
LnkCap: Speed 8GT/s, Width x4
LnkSta: Speed 2.5GT/s, Width x2, DLActive+
LnkCtl2: Target Link Speed: 2.5GT/s, SpeedDis+
LnkSta2: EqualizationComplete-, EqualizationPhase1/2/3-
Endpoint 0000:07:00.0:
LnkCap: Speed 8GT/s, Width x4
LnkSta: Speed 2.5GT/s (downgraded), Width x2 (downgraded)
LnkCtl2: Target Link Speed: 8GT/s
LnkSta2: EqualizationComplete-, EqualizationPhase1/2/3-
My guess: this motherboard supports different PCIe generations depending
on which CPU is installed, and with this CPU the link just can't run at
the advertised 8GT/s — which would explain why the 8GT/s retrain fails.
Tested on a locally rebuilt Proxmox/Ubuntu 7.0.14-8 backport, not
mainline. Also replied in kernel Bugzilla #221801:
https://bugzilla.kernel.org/show_bug.cgi?id=221801
Happy to test a diagnostic patch.
Best regards,
Aoxtj