[PATCH] nvme-host: fix the updating of the firmware version

Daniel Wagner dwagner at suse.de
Thu Jan 18 04:31:20 PST 2024


On Thu, Jan 18, 2024 at 12:48:54PM +0100, Maurizio Lombardi wrote:
> The original code didn't update the firmware version if the
> "next slot" of the AFI register isn't zero or if the
> "current slot" field is zero; in those cases it assumed
> that a reset was needed.
> 
> However, the NVMe specification doesn't exclude the possibility that
> the "next slot" value is equal to the "current slot" value,
> meaning that the same firmware slot will be activated after performing
> a controller level reset; in this case a reset is clearly not
> necessary and we can safely update the firmware version.

Is this not an undefined behavior if it is not in the spec? Just
saying this is not so clear to me.



More information about the Linux-nvme mailing list