[PATCH 3/3] [SRU][N] nvme: fixup scan failure for non-ANA multipath controllers

Heitor Alves de Siqueira halves at canonical.com
Fri Jul 4 18:12:28 UTC 2025


From: Hannes Reinecke <hare at kernel.org>

BugLink: https://bugs.launchpad.net/bugs/2115209

Commit 62baf70c3274 caused the ANA log page to be re-read, even on
controllers that do not support ANA.  While this should generally
harmless, some controllers hang on the unsupported log page and
never finish probing.

Fixes: 62baf70c3274 ("nvme: re-read ANA log page after ns scan completes")
Signed-off-by: Hannes Reinecke <hare at kernel.org>
Tested-by: Srikanth Aithal <sraithal at amd.com>
[hch: more detailed commit message]
Signed-off-by: Christoph Hellwig <hch at lst.de>
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
(cherry picked from commit 26d7fb4fd4ca1180e2fa96587dea544563b4962a)
Signed-off-by: Heitor Alves de Siqueira <halves at canonical.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f08601254345..fd8fa4f114c7 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4081,7 +4081,7 @@ static void nvme_scan_work(struct work_struct *work)
 	if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
 		nvme_queue_scan(ctrl);
 #ifdef CONFIG_NVME_MULTIPATH
-	else
+	else if (ctrl->ana_log_buf)
 		/* Re-read the ANA log page to not miss updates */
 		queue_work(nvme_wq, &ctrl->ana_work);
 #endif
-- 
2.50.0




More information about the kernel-team mailing list