Subject: nvme nvme0: Failed to get ANA log after suspend/resume

From: David Wang <[email-masked]>
Date: Wed, 16 Apr 2025 22:44:46 +0800

Hi,

On 4/14/2025 4:39 PM, Hannes Reinecke wrote:
> Can you try this?
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 78963cab1f74..425c00b02f3e 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4455,7 +4455,7 @@ static void nvme_scan_work(struct work_struct 
> *work)
>         if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
>                 nvme_queue_scan(ctrl);
>  #if 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

I notice a new nvme warning kernel log introduced in 6.15-rc2 when
 suspend/resume my system:

	nvme nvme0: Failed to get ANA log: 16649

And apply the patch can fix it.

Just FYI
David.