[PATCH] nvme: add support for TP4084 - Time-to-Ready Enhancements

Chaitanya Kulkarni chaitanyak at nvidia.com
Wed May 18 09:14:37 PDT 2022


On 5/18/22 08:00, Christoph Hellwig wrote:
> On Wed, May 18, 2022 at 08:36:47AM -0600, Keith Busch wrote:
>> On Wed, May 18, 2022 at 08:40:40AM +0200, Christoph Hellwig wrote:
>>> +static int nvme_identify_ns_cs_indep(struct nvme_ctrl *ctrl, unsigned nsid,
>>> +			struct nvme_id_ns_cs_indep **id)
>>> +{
>>> +	struct nvme_command c = {
>>> +		.identify.opcode	= nvme_admin_identify,
>>> +		.identify.nsid		= cpu_to_le32(nsid),
>>> +		.identify.cns		= NVME_ID_CNS_NS_CS_INDEP,
>>> +	};
>>> +	int error;
>>
>> Every other place in this driver calls this value 'ret'.
> 
> Except for nvme_identify_ns, where I copied it from :)
> 
> But I can change it to ret.

that'd be great.

[...]

> 
> ---
>  From 032b8a803bf5bec4c4f206d9cc5a4b1160e0dc69 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch at lst.de>
> Date: Mon, 16 May 2022 15:09:21 +0200
> Subject: 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 at lst.de>
> ---


Thanks for not adding a new member to nvme_ctrl any new member.
Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

-ck




More information about the Linux-nvme mailing list