]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: re-read ANA log page after ns scan completes
authorHannes Reinecke <hare@kernel.org>
Thu, 3 Apr 2025 07:19:30 +0000 (09:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:47:05 +0000 (07:47 +0200)
commit498027367f4af565fce8d6399a0c58bda0e78821
tree476c8d6b5f7f6cd0b153e92917beec496ca21697
parent510ba30dd37bb3c9355bc8d44a75eee56cba04f8
nvme: re-read ANA log page after ns scan completes

[ Upstream commit 62baf70c327444338c34703c71aa8cc8e4189bd6 ]

When scanning for new namespaces we might have missed an ANA AEN.

The NVMe base spec (NVMe Base Specification v2.1, Figure 151 'Asynchonous
Event Information - Notice': Asymmetric Namespace Access Change) states:

  A controller shall not send this even if an Attached Namespace
  Attribute Changed asynchronous event [...] is sent for the same event.

so we need to re-read the ANA log page after we rescanned the namespace
list to update the ANA states of the new namespaces.

Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c