nvme: make nvme_qpair_enable just set the is_enabled flag

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453748
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2019-05-08 16:54:30 -07:00 committed by Changpeng Liu
parent 040801010a
commit 4aac975b35
3 changed files with 8 additions and 5 deletions

View File

@ -1923,6 +1923,7 @@ nvme_ctrlr_enable_admin_queue(struct spdk_nvme_ctrlr *ctrlr)
{
nvme_transport_qpair_reset(ctrlr->adminq);
nvme_qpair_enable(ctrlr->adminq);
nvme_transport_qpair_abort_reqs(ctrlr->adminq, 0 /* retry */);
}
/**

View File

@ -405,7 +405,9 @@ static bool
nvme_qpair_check_enabled(struct spdk_nvme_qpair *qpair)
{
if (!qpair->is_enabled && !qpair->ctrlr->is_resetting) {
nvme_qpair_abort_queued_reqs(qpair, 0 /* retry */);
nvme_qpair_enable(qpair);
nvme_transport_qpair_abort_reqs(qpair, 0 /* retry */);
}
return qpair->is_enabled;
@ -592,12 +594,7 @@ nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_request *re
void
nvme_qpair_enable(struct spdk_nvme_qpair *qpair)
{
if (nvme_qpair_is_io_queue(qpair)) {
nvme_qpair_abort_queued_reqs(qpair, 0);
}
qpair->is_enabled = true;
nvme_transport_qpair_abort_reqs(qpair, 0 /* retry */);
}
void

View File

@ -185,6 +185,11 @@ nvme_transport_admin_qpair_abort_aers(struct spdk_nvme_qpair *qpair)
{
}
void
nvme_transport_qpair_abort_reqs(struct spdk_nvme_qpair *qpair, uint32_t dnr)
{
}
int
nvme_driver_init(void)
{