nvme: print ERRLOGs when init fails due to CSTS read failure
When the controller initialization is failed due to not being able to read the CSTS register, an ERRLOG is now printed instead of DEBUGLOG. It should make it easier to debug initialization failures. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I42602bd08e263faf2e87fe4a68abcc82ddec11ba Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9556 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
73050d511a
commit
e4e94c383b
@ -3530,11 +3530,12 @@ nvme_ctrlr_process_init_wait_for_ready_1(void *ctx, uint64_t value, const struct
|
||||
/* While a device is resetting, it may be unable to service MMIO reads
|
||||
* temporarily. Allow for this case.
|
||||
*/
|
||||
NVME_CTRLR_DEBUGLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
if (!ctrlr->is_failed && ctrlr->state_timeout_tsc != NVME_TIMEOUT_INFINITE) {
|
||||
NVME_CTRLR_DEBUGLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_1,
|
||||
NVME_TIMEOUT_KEEP_EXISTING);
|
||||
} else {
|
||||
NVME_CTRLR_ERRLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ERROR, NVME_TIMEOUT_INFINITE);
|
||||
}
|
||||
|
||||
@ -3563,11 +3564,12 @@ nvme_ctrlr_process_init_wait_for_ready_0(void *ctx, uint64_t value, const struct
|
||||
/* While a device is resetting, it may be unable to service MMIO reads
|
||||
* temporarily. Allow for this case.
|
||||
*/
|
||||
NVME_CTRLR_DEBUGLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
if (!ctrlr->is_failed && ctrlr->state_timeout_tsc != NVME_TIMEOUT_INFINITE) {
|
||||
NVME_CTRLR_DEBUGLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_0,
|
||||
NVME_TIMEOUT_KEEP_EXISTING);
|
||||
} else {
|
||||
NVME_CTRLR_ERRLOG(ctrlr, "Failed to read the CSTS register\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ERROR, NVME_TIMEOUT_INFINITE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user