Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: Ignore Immediate Readiness on Samsung PM9D3a NVMe
@ 2026-10-22  5:58 Sun Yuechi
  2026-10-22  6:01 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Sun Yuechi @ 2026-10-22  5:58 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Lukas Wunner, Alexander Gruhlke, linux-pci, linux-kernel

The Samsung PM9D3a [144d:a80e] (MZWL63T8HFLT-00B07, firmware LDD5702Q)
advertises Immediate Readiness, so pcie_flr() doesn't wait after FLR,
but the drive returns ~0 for up to 6 ms.  The config restore runs about
1 ms after the FLR, so the BARs and Command register are lost and
neither vfio-pci nor a rebound nvme driver can reach the device:

  pci 0008:01:00.0: reset via flr
  pci 0008:01:00.0: restore config 0x10: 0xffffffff -> 0x10010004
  nvme 0008:01:00.0: error -ENODEV: probe failed

Ignore Immediate Readiness on this device too, so pcie_flr() waits.

Fixes: 10baa9b4df40 ("PCI: Drop unnecessary retries when restoring BARs")
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
---
Tested on two PM9D3a drives on a v7.2.6 kernel with 0f8b5d90d179
backported: FLR-to-restore delay goes from ~1 ms to ~100 ms, BARs
are preserved, and nvme rebind and vfio-pci both work.

 drivers/pci/quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1aa87a3ef9ed..706e128f408c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5645,6 +5645,7 @@ static void quirk_no_imm_ready(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SAMSUNG, 0xa80c, quirk_no_imm_ready);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SAMSUNG, 0xa80d, quirk_no_imm_ready);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SAMSUNG, 0xa80e, quirk_no_imm_ready);
 
 static void quirk_no_ext_tags(struct pci_dev *pdev)
 {
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-22  6:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22  5:58 [PATCH] PCI: Ignore Immediate Readiness on Samsung PM9D3a NVMe Sun Yuechi
2026-10-22  6:01 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox