diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index c5876ff225..a62f54f3dc 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -358,7 +358,8 @@ spdk_nvmf_ctrlr_connect(struct spdk_nvmf_request *req) return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; } - if (subsystem->state != SPDK_NVMF_SUBSYSTEM_ACTIVE) { + if ((subsystem->state == SPDK_NVMF_SUBSYSTEM_INACTIVE) || + (subsystem->state == SPDK_NVMF_SUBSYSTEM_DEACTIVATING)) { SPDK_ERRLOG("Subsystem '%s' is not ready\n", subnqn); rsp->status.sct = SPDK_NVME_SCT_COMMAND_SPECIFIC; rsp->status.sc = SPDK_NVMF_FABRIC_SC_CONTROLLER_BUSY;