diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index 7d319bc24..e9a799fa8 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -1134,8 +1134,8 @@ nvme_ctrlr_state_string(enum nvme_ctrlr_state state) switch (state) { case NVME_CTRLR_STATE_INIT_DELAY: return "delay init"; - case NVME_CTRLR_STATE_INIT: - return "init"; + case NVME_CTRLR_STATE_CHECK_EN: + return "check en"; case NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_1: return "disable and wait for CSTS.RDY = 1"; case NVME_CTRLR_STATE_DISABLE_WAIT_FOR_READY_0: @@ -3124,7 +3124,7 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr) } break; - case NVME_CTRLR_STATE_INIT: + case NVME_CTRLR_STATE_CHECK_EN: /* synonymous with NVME_CTRLR_STATE_INIT */ /* Begin the hardware initialization by making sure the controller is disabled. */ if (cc.bits.en) { NVME_CTRLR_DEBUGLOG(ctrlr, "CC.EN = 1\n"); diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 495ff9424..e3b4ed8db 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -518,9 +518,14 @@ enum nvme_ctrlr_state { NVME_CTRLR_STATE_INIT_DELAY, /** - * Controller has not been initialized yet. + * Check EN to prepare for controller initialization. */ - NVME_CTRLR_STATE_INIT, + NVME_CTRLR_STATE_CHECK_EN, + + /** + * Controller has not started initialized yet. + */ + NVME_CTRLR_STATE_INIT = NVME_CTRLR_STATE_CHECK_EN, /** * Waiting for CSTS.RDY to transition from 0 to 1 so that CC.EN may be set to 0.