nvme: don't enable adminq until we know discovery_ctrlr exists

Fixes issue #1029.

Signed-off-by: Jim Harris <james.r.harris@intel.com>

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473237 (master)

(cherry picked from commit e0a0f90b0f)
Change-Id: I489dfc853804b005d385b1c51815f0e7f342b39b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478341
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2019-11-04 05:37:33 -07:00 committed by Tomasz Zawadzki
parent a60e966556
commit 58da6e7000

View File

@ -240,10 +240,10 @@ nvme_fabric_ctrlr_scan(struct spdk_nvme_probe_ctx *probe_ctx,
discovery_opts.keep_alive_timeout_ms = 0;
discovery_ctrlr = nvme_transport_ctrlr_construct(&probe_ctx->trid, &discovery_opts, NULL);
nvme_qpair_set_state(discovery_ctrlr->adminq, NVME_QPAIR_ENABLED);
if (discovery_ctrlr == NULL) {
return -1;
}
nvme_qpair_set_state(discovery_ctrlr->adminq, NVME_QPAIR_ENABLED);
/* TODO: this should be using the normal NVMe controller initialization process +1 */
cc.raw = 0;