nvme: log additional message for controller status
PATCH 1/1 nvme: log additional message for controller status
Logging the controller fatal and ready status would help to identfy if issue lies within kernel nvme subsytem or controller is unhealthy.
--- drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/nvme/host/core.c +3 -2
@@ -2079,8 +2079,9 @@ static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled)return -EINTR ;if (time_after (jiffies, timeout)) {dev_err (ctrl->device, -"Device not ready; aborting %s\n" , enabled ? -"initialisation" :"reset" ); +"Device not ready; aborting %s, RDY=0x%x, CFS=0x%x\n" , + enabled ?"initialisation" :"reset" , + csts &NVME_CSTS_RDY , csts &NVME_CSTS_CFS );return -ENODEV ; } }
Signature · 7 lines
1.8.3.1 _______________________________________________ linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 5 lines · Rupesh Girase
Logging the controller fatal and ready status would help to identfy if issue lies within kernel nvme subsytem or controller is unhealthy.
Signed-off-by Rupesh Girase <[email protected]>
There should be no tabs before the commit message.
Otherwise this looks good:
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Looks good, with tabs in commit log fixed at the time of applying patch.
Quoted 5 lines · Rupesh Girase
Logging the controller fatal and ready status would help to identfy if issue lies within kernel nvme subsytem or controller is unhealthy.
Signed-off-by Rupesh Girase <[email protected]>
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keith Busch
maintainerdrivers/nvme/host/core.c static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled) · line 2084
Quoted 6 lines · Rupesh Girase
drivers/nvme/host/core.c +3
-2dev_err (ctrl->device, -"Device not ready; aborting %s\n" , enabled ? -"initialisation" :"reset" ); +"Device not ready; aborting %s, RDY=0x%x, CFS=0x%x\n" , + enabled ?"initialisation" :"reset" , + csts &NVME_CSTS_RDY , csts &NVME_CSTS_CFS );
The RDY bit is a bit redundant. If "initialisation", we know it's not 1, and if "reset", we know it's not 0. We also know it's not all 1's if we reach here.
CFS may be useful, but the print will look a strange. If CFS is set, you'll see "CFS=0x2", but the CFS field can only be either 0 or 1. I say just print out the entire csts field in case SHST or NSSRO may provide insights to the vendor.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 13 lines · Rupesh Girase
drivers/nvme/host/core.c static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled) · line 2084
Quoted 6 lines
dev_err(ctrl->device,
drivers/nvme/host/core.c +3
-2-"Device not ready; aborting %s\n" , enabled ? - "initialisation" : "reset"); +"Device not ready; aborting %s, RDY=0x%x, CFS=0x%x\n" , + enabled ?"initialisation" :"reset" , + csts & NVME_CSTS_RDY, csts & NVME_CSTS_CFS);The RDY bit is a bit redundant. If "initialisation", we know it's not 1, and if "reset", we know it's not 0. We also know it's not all 1's if we reach here.
Quoted 4 lines
CFS may be useful, but the print will look a strange. If CFS is set, you'll see "CFS=0x2", but the CFS field can only be either 0 or 1. I say just print out the entire csts field in case SHST or NSSRO may provide insights to the vendor.
Suggestions sound fine, looks reasonable either way.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme