nvmf/vfio-user: remove unnecessary controller SHN state check
The CSTS.SHN is changed only in shutting down the controller, nvmf library already ensure that all the outstanding IOs will be flushed before that, so we can remove this check here. Change-Id: Ib93a256e986b7b2ec1da0fc7992feb3a02c1d657 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11674 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
63f6d50b5b
commit
673859cd0d
@ -1593,7 +1593,6 @@ post_completion(struct nvmf_vfio_user_ctrlr *ctrlr, struct nvmf_vfio_user_cq *cq
|
||||
uint32_t cdw0, uint16_t sqid, uint16_t cid, uint16_t sc, uint16_t sct)
|
||||
{
|
||||
struct spdk_nvme_status cpl_status = { 0 };
|
||||
const struct spdk_nvmf_registers *regs;
|
||||
struct spdk_nvme_cpl *cpl;
|
||||
int err;
|
||||
|
||||
@ -1603,14 +1602,6 @@ post_completion(struct nvmf_vfio_user_ctrlr *ctrlr, struct nvmf_vfio_user_cq *cq
|
||||
return 0;
|
||||
}
|
||||
|
||||
regs = spdk_nvmf_ctrlr_get_regs(ctrlr->ctrlr);
|
||||
if (regs->csts.bits.shst != SPDK_NVME_SHST_NORMAL) {
|
||||
SPDK_DEBUGLOG(nvmf_vfio,
|
||||
"%s: ignore completion sqid:%d cid=%d status=%#x\n",
|
||||
ctrlr_id(ctrlr), sqid, cid, sc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cq_is_full(cq)) {
|
||||
SPDK_ERRLOG("%s: cqid:%d full (tail=%d, head=%d)\n",
|
||||
ctrlr_id(ctrlr), cq->qid, *cq_tailp(cq),
|
||||
|
Loading…
Reference in New Issue
Block a user