mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kun An <ankun@uniontech.com>
To: linux-nvme@lists.infradead.org
Cc: kbusch@kernel.org, hch@lst.de, axboe@kernel.dk, sagi@grimberg.me,
	linux-kernel@vger.kernel.org, Kun An <ankun@uniontech.com>
Subject: [PATCH] nvme-pci: force simple suspend on Inspur NF50
Date: Fri, 16 Oct 2026 11:38:05 +0800	[thread overview]
Message-ID: <20261016033805.9978-1-ankun@uniontech.com> (raw)

The Inspur CP300F3 / NF50 platform loses the PCIe link across S3 and
NVMe resume fails.  Force the simple suspend path for this board.

Signed-off-by: Kun An <ankun@uniontech.com>
---
 drivers/nvme/host/pci.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 77317e5d00f9..c24214c92e82 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3664,6 +3664,20 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
 	}
 
+	/*
+	 * On the Inspur CP300F3 / NF50 (Phytium) platform the SoC root complex
+	 * does not keep the PCIe link alive across an S3 (deep) suspend, so an
+	 * NVMe controller that the host-managed suspend path leaves in a
+	 * non-operational power state never comes back after resume (I/O
+	 * timeouts, reset failure, filesystem abort).  The firmware does not
+	 * advertise firmware-managed suspend and the failure reproduces with
+	 * SSDs from different vendors, so key off the board instead of a
+	 * specific device and always take the full shutdown path there.
+	 */
+	if (dmi_match(DMI_BOARD_VENDOR, "Inspur") &&
+	    dmi_match(DMI_BOARD_NAME, "NF50"))
+		return NVME_QUIRK_SIMPLE_SUSPEND;
+
 	/*
 	 * NVMe SSD drops off the PCIe bus after system idle
 	 * for 10 hours on a Lenovo N60z board.
-- 
2.20.1


                 reply	other threads:[~2026-10-16  3:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261016033805.9978-1-ankun@uniontech.com \
    --to=ankun@uniontech.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®