]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nvmet-fc: remove use of FC-specific error codes
authorJames Smart <jsmart2021@gmail.com>
Thu, 7 Sep 2017 23:27:27 +0000 (16:27 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Sep 2017 14:56:05 +0000 (08:56 -0600)
The FC-NVME target transport used the FC-specific error codes in
return codes when the transport or lldd failed. Instead of using the
FC-specific values, now use a generic value (NVME_SC_INTERNAL).

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/fc.c

index 421e43bf1dd78f5d15f1ffb7cf88d36575ec3503..088f07250d7606ac6572f13171c238521300304a 100644 (file)
@@ -1910,8 +1910,7 @@ nvmet_fc_transfer_fcp_data(struct nvmet_fc_tgtport *tgtport,
                        spin_lock_irqsave(&fod->flock, flags);
                        fod->writedataactive = false;
                        spin_unlock_irqrestore(&fod->flock, flags);
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                } else /* NVMET_FCOP_READDATA or NVMET_FCOP_READDATA_RSP */ {
                        fcpreq->fcp_error = ret;
                        fcpreq->transferred_length = 0;
@@ -1929,8 +1928,7 @@ __nvmet_fc_fod_op_abort(struct nvmet_fc_fcp_iod *fod, bool abort)
        /* if in the middle of an io and we need to tear down */
        if (abort) {
                if (fcpreq->op == NVMET_FCOP_WRITEDATA) {
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                        return true;
                }
 
@@ -1968,8 +1966,7 @@ nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod)
                        fod->abort = true;
                        spin_unlock(&fod->flock);
 
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                        return;
                }