diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index 931647f7bf..c40ab74fe5 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -387,11 +387,7 @@ nvme_ctrlr_create_io_qpair(struct spdk_nvme_ctrlr *ctrlr, } nvme_robust_mutex_lock(&ctrlr->ctrlr_lock); - if (nvme_ctrlr_get_cc(ctrlr, &cc)) { - NVME_CTRLR_ERRLOG(ctrlr, "get_cc failed\n"); - nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock); - return NULL; - } + cc.raw = ctrlr->process_init_cc.raw; if (opts->qprio & ~SPDK_NVME_CREATE_IO_SQ_QPRIO_MASK) { nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock); diff --git a/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c b/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c index 085f198766..72baad681a 100644 --- a/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c +++ b/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c @@ -1578,7 +1578,7 @@ test_alloc_io_qpair_wrr_1(void) * Fake to simulate the controller with weighted round robin * arbitration mechanism. */ - g_ut_nvme_regs.cc.bits.ams = SPDK_NVME_CC_AMS_WRR; + ctrlr.process_init_cc.bits.ams = SPDK_NVME_CC_AMS_WRR; spdk_nvme_ctrlr_get_default_io_qpair_opts(&ctrlr, &opts, sizeof(opts)); @@ -1632,7 +1632,7 @@ test_alloc_io_qpair_wrr_2(void) * Fake to simulate the controller with weighted round robin * arbitration mechanism. */ - g_ut_nvme_regs.cc.bits.ams = SPDK_NVME_CC_AMS_WRR; + ctrlr.process_init_cc.bits.ams = SPDK_NVME_CC_AMS_WRR; spdk_nvme_ctrlr_get_default_io_qpair_opts(&ctrlr, &opts, sizeof(opts));