nvme_ctrlr.c: Add error logs
Add NVME_CTRLR_ERRLOGs to nvme_ctrlr_process_init(). The main goal is to help with debugging #2201 issue. Change-Id: I1ae6a9b30d6124dfe25eb7912402c37d476b0d4c Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10627 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
bcf6941ec3
commit
a9a55513e5
@ -3858,6 +3858,9 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
NVME_CTRLR_DEBUGLOG(ctrlr, "Setting CC.EN = 1\n");
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_ENABLE_WAIT_FOR_CC, ready_timeout_in_ms);
|
||||
rc = nvme_ctrlr_enable(ctrlr);
|
||||
if (rc) {
|
||||
NVME_CTRLR_ERRLOG(ctrlr, "Ctrlr enable failed with error: %d", rc);
|
||||
}
|
||||
return rc;
|
||||
|
||||
case NVME_CTRLR_STATE_ENABLE_WAIT_FOR_READY_1:
|
||||
@ -3972,6 +3975,11 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
NVME_CTRLR_ERRLOG(ctrlr, "Ctrlr operation failed with error: %d, ctrlr state: %d",
|
||||
rc, ctrlr->state);
|
||||
}
|
||||
|
||||
/* Note: we use the ticks captured when we entered this function.
|
||||
* This covers environments where the SPDK process gets swapped out after
|
||||
* we tried to advance the state but before we check the timeout here.
|
||||
|
Loading…
Reference in New Issue
Block a user