nvme: add NVME_CTRLR_STATE_CHECK_EN
We're going to be adding some new states (READ_CAP and READ_VS) in future patches, that we want to come before the current "INIT" state. So we will simply make "INIT" have the same value as this new NVME_CTRLR_STATE_CHECK_EN state for now. That means existing code won't have to change later once we add new states that come before CHECK_EN. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I07ca92e28ab1cd8d838cdef5c3ff36ba80a224bf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8075 Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
3db73426f2
commit
a12cf26cdd
@ -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");
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user