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

Daniel Wagner dwagner at suse.de
Fri Jan 19 00:42:24 PST 2024


On Thu, Jan 18, 2024 at 02:21:03PM +0100, Maurizio Lombardi wrote:
> čt 18. 1. 2024 v 13:31 odesílatel Daniel Wagner <dwagner at suse.de> napsal:
> >
> > Is this not an undefined behavior if it is not in the spec? Just
> > saying this is not so clear to me.
> >
> 
> I don't think it is relevant in this case.
> The spec just says that bits 2:0 are the active firmware slot and
> bits 6:4 are the next firmware slot, it doesn't say that
> they must have different values.

I see.

> What the spec leaves undefined is what does it mean a "current fw slot"
> with value zero, which is invalid.

The valid range is 1-7 for the slot ids, that rules out the value
zero IMO. Yeah, I agree not a thing at all.

> By the way, I submitted this patch because we have a customer that complained
> that after a firmware update he noticed a discrepancy between the fw
> version reported
> by the kernel and the one reported by nvme-cli.
> He says that this patch fixed the error.

I suspected this but it was not mentioned in the commit message. Good to
know that it fixes something. In this case,

Reviewed-by: Daniel Wagner <dwagner at suse.de>

Thanks,
Daniel



More information about the Linux-nvme mailing list