From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvme: update firmware version after commit
Date: Fri, 13 Oct 2023 13:02:29 +0000 [thread overview]
Message-ID: <ZSk/5Fubv+BYPQ3z@x1-carbon> (raw)
In-Reply-To: <20231013062623.6745-1-dwagner@suse.de>
On Fri, Oct 13, 2023 at 08:26:23AM +0200, Daniel Wagner wrote:
> The firmware version sysfs entry needs to be updated after a successfully
> firmware activation.
>
> nvme-cli stopped issuing an Identify Controller command to list the
> current firmware information and relies on sysfs showing the current
> firmware version.
>
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
> drivers/nvme/host/core.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 62612f87aafa..bb15d878e8a2 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4079,6 +4079,20 @@ static void nvme_get_fw_slot_info(struct nvme_ctrl *ctrl)
> kfree(log);
> }
>
> +static void nvme_update_firmware_rev(struct nvme_ctrl *ctrl)
> +{
> + struct nvme_id_ctrl *id;
> + int ret;
> +
> + ret = nvme_identify_ctrl(ctrl, &id);
Hello Daniel,
I understand that nvme_fw_act_work() is called when
receiving a NVME_AER_NOTICE_FW_ACT_STARTING AEN.
This AEN is received when a Firmware Activate command was
issued with value 0x3 "The image specified by the Firmware Slot
field is requested to be activated immediately without reset."
However, when upgrading firmware (even without a reset),
can't more things other than FW version change?
Sure, I understand that there is no need to do a reset
(as in the cases there the firmware deems that a reset is
needed to do the FW activation without reset, the Firmware Activate
command with value 0x3 returns a failure), but it just seems like
more fields than FW version needs to be re-read.
Theoretically, can't a FW upgrade go from NVMe 1.4 to NVMe 2.0,
and that firmware can return success for the Firmware Activate
command with value 0x3?
Kind regards,
Niklas
next prev parent reply other threads:[~2023-10-13 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 6:26 [PATCH] nvme: update firmware version after commit Daniel Wagner
2023-10-13 13:02 ` Niklas Cassel [this message]
2023-10-13 14:13 ` Keith Busch
2023-10-13 14:07 ` 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=ZSk/5Fubv+BYPQ3z@x1-carbon \
--to=niklas.cassel@wdc.com \
--cc=dwagner@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/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