Re: [PATCH 2/2] PCI: Wait for readiness after FLR even with Immediate Readiness
From: Lukas Wunner
Date: Sat Oct 10 2026 - 13:52:00 EST
On Sat, Oct 10, 2026 at 06:05:29PM +0200, Alexander Gruhlke wrote:
> pcie_flr() and pci_af_flr() skip pci_dev_wait() if the device advertises
> Immediate Readiness. Since commit 10baa9b4df40 ("PCI: Drop unnecessary
> retries when restoring BARs"), the subsequent config restore isn't
> retried, so it is lost if the device isn't ready after all.
>
> The Samsung 990 PRO [144d:a80c] advertises Immediate Readiness but
> returns ~0 for 1-7 ms after FLR, which breaks VFIO passthrough. Keep
> skipping the 100 ms delay, but call pci_dev_wait().
The device is incorrectly advertising Immediate Readiness, so I suggest
clearing dev->imm_ready from a DECLARE_PCI_FIXUP_FINAL() quirk and
emitting a message with KERN_INFO severity with something like
"Ignoring incorrectly advertised Immediate Readiness support".
Your patch instead silently works around the problem and that means
whenever a device manufacturer makes this mistake, their validation
engineers don't realize there's a bug and it never gets fixed and
keeps proliferating. On the other hand, if (as I'm suggesting)
the bug is selectively worked around with a quirk only on affected
devices, then core code isn't polluted with a workaround only needed
by a handful of devices and the emitted message helps validation folks
learn there's a problem and demand a fix from the silicon team.
Thanks,
Lukas