nvme: add support for TP4084 - Time-to-Ready Enhancements
authorChristoph Hellwig <hch@lst.de>
Mon, 16 May 2022 13:09:21 +0000 (15:09 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 18 May 2022 16:54:17 +0000 (18:54 +0200)
commit354201c53e61e493017b15327294b0c8ab522d69
treedc029d981c51292a12b12b5215866bf80abbe789
parentda14f237ceef059ff1a9ee14de283905c2dac11c
nvme: add support for TP4084 - Time-to-Ready Enhancements

Add support for using longer timeouts during controller initialization
and letting the controller come up with namespaces that are not ready
for I/O yet.  We skip these not ready namespaces during scanning and
only bring them online once anoter scan is kicked off by the AEN that
is set when the NRDY bit gets set in the  I/O Command Set Independent
Identify Namespace Data Structure.   This asynchronous probing avoids
blocking the kernel boot when controllers take a very long time to
recover after unclean shutdowns (up to minutes).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/nvme/host/constants.c
drivers/nvme/host/core.c
include/linux/nvme.h