Skip to contentSkip to conversation

nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info

PATCH In review Yi Zhang 3 participants 3 messages Feb 14, 2020 NVMe

lore
Share & tools
lore

Yi Zhang

author
#0 lore raw

PATCH 1/1 nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info

nvme fw-activate operation will get bellow warning log, fix it by update the parameter order

[  113.231513] nvme nvme0: Get FW SLOT INFO log error
Fixes 0e98719b0e4b ("nvme: simplify the API for getting log pages")
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index 5dc32b72e7fa..641c07347e8d 100644
@@ -3867,7 +3867,7 @@ static void nvme_get_fw_slot_info(struct nvme_ctrl *ctrl)
 	if (!log)
 		return;
 
-	if (nvme_get_log(ctrl, NVME_NSID_ALL, 0, NVME_LOG_FW_SLOT, log,
+	if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, log,
 			sizeof(*log), 0))
 		dev_warn(ctrl->device, "Get FW SLOT INFO log error\n");
 	kfree(log);
Signature · 7 lines
2.21.0


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 18 lines · Yi Zhang

nvme fw-activate operation will get bellow warning log, fix it by update the parameter order

[  113.231513] nvme nvme0: Get FW SLOT INFO log error
Fixes 0e98719b0e4b ("nvme: simplify the API for getting log pages")
---
  drivers/nvme/host/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +0 -0
index 5dc32b72e7fa..641c07347e8d 100644

drivers/nvme/host/core.c static void nvme_get_fw_slot_info(struct nvme_ctrl *ctrl) · line 3873

Quoted 8 lines
drivers/nvme/host/core.c +1 -1
@@ -3867,7 +3867,7 @@ static void nvme_get_fw_slot_info(struct nvme_ctrl *ctrl)
  	if (!log)
  		return;
 
-	if (nvme_get_log(ctrl, NVME_NSID_ALL, 0, NVME_LOG_FW_SLOT, log,
+	if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, log,
  			sizeof(*log), 0))
  		dev_warn(ctrl->device, "Get FW SLOT INFO log error\n");
  	kfree(log);

The controller returns a status of "Invalid Log Page" from nvme_get_log() on different devices.

Thanks,
David

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer
#2 lore raw
In reply to Yi Zhang
Quoted 8 lines · Yi Zhang

nvme fw-activate operation will get bellow warning log, fix it by update the parameter order

[  113.231513] nvme nvme0: Get FW SLOT INFO log error
Fixes 0e98719b0e4b ("nvme: simplify the API for getting log pages")

Oops, thanks for the fix. Applied to nvme-5.6-rc.

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme