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

Maurizio Lombardi mlombard at redhat.com
Thu Jan 18 05:21:03 PST 2024


č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.

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

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.

Maurizio




More information about the Linux-nvme mailing list