Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: guzebing <guzebing1612@gmail.com>
Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Guzebing <guzebing@bytedance.com>
Subject: Re: [PATCH v4] nvme: reduce firmware activation poll interval
Date: Tue, 11 Aug 2026 10:46:18 -0600	[thread overview]
Message-ID: <antR2u1eeBDCr0ux@kbusch-mbp> (raw)
In-Reply-To: <20260728121735.1627370-1-guzebing1612@gmail.com>

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?


  parent reply	other threads:[~2026-08-11 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 12:17 [PATCH v4] nvme: reduce firmware activation poll interval guzebing
2026-08-11 16:08 ` Keith Busch
2026-08-11 16:46 ` Keith Busch [this message]
2026-08-12  3:23   ` guzebing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=antR2u1eeBDCr0ux@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=guzebing1612@gmail.com \
    --cc=guzebing@bytedance.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox