public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Daniel Wagner <dwagner@suse.de>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>,
	Niklas Cassel <Niklas.Cassel@wdc.com>,
	Kenji Tomonaga <tkenbo@gmail.com>
Subject: Re: [PATCH v2] nvme: update firmware version after commit
Date: Fri, 13 Oct 2023 10:43:48 -0600	[thread overview]
Message-ID: <ZSlzxGx8k9pgkhDk@kbusch-mbp> (raw)
In-Reply-To: <20231013163420.3097-1-dwagner@suse.de>

On Fri, Oct 13, 2023 at 06:34:20PM +0200, Daniel Wagner wrote:
>  	if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, NVME_CSI_NVM,
> -			log, sizeof(*log), 0))
> +			 log, sizeof(*log), 0)) {
>  		dev_warn(ctrl->device, "Get FW SLOT INFO log error\n");
> +		goto out_free_log;
> +	}
> +
> +	afi = le64_to_cpu(log->afi);
> +	if (afi & 0x30) {

That should be 'afi & 0x70'.

> +		dev_info(ctrl->device,
> +			 "Firmware is activated after next Controller Level Reset\n");
> +		goto out_free_log;
> +	}
> +
> +	memcpy(ctrl->subsys->firmware_rev, &log->frs[afi & 0x3],

and 'afi & 0x7'.


  reply	other threads:[~2023-10-13 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 16:34 [PATCH v2] nvme: update firmware version after commit Daniel Wagner
2023-10-13 16:43 ` Keith Busch [this message]
2023-10-13 19:43   ` Niklas Cassel
2023-10-13 20:37   ` Niklas Cassel
2023-10-30 15:07     ` Daniel Wagner
2023-10-30 15:55   ` Daniel Wagner
2023-10-24  6:21 ` Chaitanya Kulkarni
2023-10-24 15:22   ` Keith Busch

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=ZSlzxGx8k9pgkhDk@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=Niklas.Cassel@wdc.com \
    --cc=dwagner@suse.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=tkenbo@gmail.com \
    /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