nvme-fc: return NVME_SC_HOST_ABORTED_CMD when a command has been aborted
authorHannes Reinecke <hare@suse.de>
Fri, 26 Feb 2021 07:17:28 +0000 (08:17 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 11 Mar 2021 10:48:34 +0000 (11:48 +0100)
When a command has been aborted we should return NVME_SC_HOST_ABORTED_CMD
to be consistent with the other transports.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c

index ef12a61..97e3424 100644 (file)
@@ -1956,7 +1956,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
                                sizeof(op->rsp_iu), DMA_FROM_DEVICE);
 
        if (opstate == FCPOP_STATE_ABORTED)
-               status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1);
+               status = cpu_to_le16(NVME_SC_HOST_ABORTED_CMD << 1);
        else if (freq->status) {
                status = cpu_to_le16(NVME_SC_HOST_PATH_ERROR << 1);
                dev_info(ctrl->ctrl.device,