[PATCH v4] nvme: reduce firmware activation poll interval

Keith Busch kbusch at kernel.org
Tue Aug 11 09:46:18 PDT 2026


On Tue, Jul 28, 2026 at 08:17:35PM +0800, guzebing wrote:
> +static int nvme_wait_ready(struct nvme_ctrl *ctrl, u32 mask, u32 val,
> +			   u32 timeout, const char *op)
> +{
> +	unsigned long timeout_jiffies = jiffies + timeout * HZ;
> +	u32 csts;
> +	int ret;
> +
> +	ret = nvme_wait_csts(ctrl, mask, val, timeout_jiffies, false, &csts);
> +	if (ret != -ETIMEDOUT)
> +		return ret;
> +
> +	dev_err(ctrl->device,
> +		"Device not ready; aborting %s, CSTS=0x%x\n", op, csts);
> +	return -ENODEV;

Actually, I'm to back this out for a moment to think about this. I like
that you've changed the error to ETIMEDOUT for that condition, but I'm
not sure we need to convert it to ENODEV. None of the callers seem to
care about the specific error, and the user visible side effect of the
condition is more informative than ENODEV.

So if we can get rid of that legacy behavior, then this simplifies even
more. Thoughts?



More information about the Linux-nvme mailing list