diff options
author | James Smart <jsmart2021@gmail.com> | 2017-09-07 19:27:27 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-09-25 10:56:05 -0400 |
commit | 29b3d26ecc8046838de88205b7c4b182ac27ff65 (patch) | |
tree | cdced2b8cc42c5dc7f91fc6069ca1d06c3234108 | |
parent | 56b7103a06083b8ce1160f8289460ba2f584e182 (diff) |
nvmet-fc: remove use of FC-specific error codes
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>
-rw-r--r-- | drivers/nvme/target/fc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c index 421e43bf1dd7..088f07250d76 100644 --- a/drivers/nvme/target/fc.c +++ b/drivers/nvme/target/fc.c | |||
@@ -1910,8 +1910,7 @@ nvmet_fc_transfer_fcp_data(struct nvmet_fc_tgtport *tgtport, | |||
1910 | spin_lock_irqsave(&fod->flock, flags); | 1910 | spin_lock_irqsave(&fod->flock, flags); |
1911 | fod->writedataactive = false; | 1911 | fod->writedataactive = false; |
1912 | spin_unlock_irqrestore(&fod->flock, flags); | 1912 | spin_unlock_irqrestore(&fod->flock, flags); |
1913 | nvmet_req_complete(&fod->req, | 1913 | nvmet_req_complete(&fod->req, NVME_SC_INTERNAL); |
1914 | NVME_SC_FC_TRANSPORT_ERROR); | ||
1915 | } else /* NVMET_FCOP_READDATA or NVMET_FCOP_READDATA_RSP */ { | 1914 | } else /* NVMET_FCOP_READDATA or NVMET_FCOP_READDATA_RSP */ { |
1916 | fcpreq->fcp_error = ret; | 1915 | fcpreq->fcp_error = ret; |
1917 | fcpreq->transferred_length = 0; | 1916 | fcpreq->transferred_length = 0; |
@@ -1929,8 +1928,7 @@ __nvmet_fc_fod_op_abort(struct nvmet_fc_fcp_iod *fod, bool abort) | |||
1929 | /* if in the middle of an io and we need to tear down */ | 1928 | /* if in the middle of an io and we need to tear down */ |
1930 | if (abort) { | 1929 | if (abort) { |
1931 | if (fcpreq->op == NVMET_FCOP_WRITEDATA) { | 1930 | if (fcpreq->op == NVMET_FCOP_WRITEDATA) { |
1932 | nvmet_req_complete(&fod->req, | 1931 | nvmet_req_complete(&fod->req, NVME_SC_INTERNAL); |
1933 | NVME_SC_FC_TRANSPORT_ERROR); | ||
1934 | return true; | 1932 | return true; |
1935 | } | 1933 | } |
1936 | 1934 | ||
@@ -1968,8 +1966,7 @@ nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod) | |||
1968 | fod->abort = true; | 1966 | fod->abort = true; |
1969 | spin_unlock(&fod->flock); | 1967 | spin_unlock(&fod->flock); |
1970 | 1968 | ||
1971 | nvmet_req_complete(&fod->req, | 1969 | nvmet_req_complete(&fod->req, NVME_SC_INTERNAL); |
1972 | NVME_SC_FC_TRANSPORT_ERROR); | ||
1973 | return; | 1970 | return; |
1974 | } | 1971 | } |
1975 | 1972 | ||