bdev/nvme: account for abort completion with cdw0=1

When an abort command completes successfully,
cdw0 bit 0 may be set to indicate that the controller
was unable to abort the specified cid.  In that case
the bdev nvme abort completion callback needs
to reset the controller.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9320
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Jim Harris 2021-08-26 08:57:34 -07:00 committed by Tomasz Zawadzki
parent cda7ddebd7
commit 64eb2cc1de

View File

@ -1684,6 +1684,9 @@ nvme_abort_cpl(void *ctx, const struct spdk_nvme_cpl *cpl)
SPDK_WARNLOG("Abort failed. Resetting controller. sc is %u, sct is %u.\n", cpl->status.sc,
cpl->status.sct);
bdev_nvme_reset(nvme_ctrlr);
} else if (cpl->cdw0 & 0x1) {
SPDK_WARNLOG("Specified command could not be aborted.\n");
bdev_nvme_reset(nvme_ctrlr);
}
}