]> git.hungrycats.org Git - linux/commit
nvme: copy firmware_rev on each init
authorKeith Busch <kbusch@kernel.org>
Mon, 19 Sep 2022 19:45:08 +0000 (12:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:28 +0000 (09:58 +0200)
commit1ce3c83795b704cf71d0c805a37f535ea0abce29
tree45bf715d58a555126e6cca680bae02ee705834fd
parent24e2357041c812d0748ed5c114c9100c84689351
nvme: copy firmware_rev on each init

[ Upstream commit a8eb6c1ba48bddea82e8d74cbe6e119f006be97d ]

The firmware revision can change on after a reset so copy the most
recent info each time instead of just the first time, otherwise the
sysfs firmware_rev entry may contain stale data.

Reported-by: Jeff Lien <jeff.lien@wdc.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Chao Leng <lengchao@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c