diff options
author | James Smart <jsmart2021@gmail.com> | 2017-09-07 19:27:26 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-09-25 10:56:05 -0400 |
commit | 56b7103a06083b8ce1160f8289460ba2f584e182 (patch) | |
tree | 437c9d686c558125d0ac3070a9cd6e40dfbe4482 | |
parent | e5313c141b49c1b1af43d1ca81398185d66ad1a6 (diff) |
nvme-fc: remove use of FC-specific error codes
The FC-NVME transport used the FC-specific error codes in cases where
it had to fabricate an error to go back up stack. 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/host/fc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index d2e882c0f496..9100779b58c9 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c | |||
@@ -1376,7 +1376,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req) | |||
1376 | if (atomic_read(&op->state) == FCPOP_STATE_ABORTED) | 1376 | if (atomic_read(&op->state) == FCPOP_STATE_ABORTED) |
1377 | status = cpu_to_le16((NVME_SC_ABORT_REQ | NVME_SC_DNR) << 1); | 1377 | status = cpu_to_le16((NVME_SC_ABORT_REQ | NVME_SC_DNR) << 1); |
1378 | else if (freq->status) | 1378 | else if (freq->status) |
1379 | status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1); | 1379 | status = cpu_to_le16(NVME_SC_INTERNAL << 1); |
1380 | 1380 | ||
1381 | /* | 1381 | /* |
1382 | * For the linux implementation, if we have an unsuccesful | 1382 | * For the linux implementation, if we have an unsuccesful |
@@ -1404,7 +1404,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req) | |||
1404 | */ | 1404 | */ |
1405 | if (freq->transferred_length != | 1405 | if (freq->transferred_length != |
1406 | be32_to_cpu(op->cmd_iu.data_len)) { | 1406 | be32_to_cpu(op->cmd_iu.data_len)) { |
1407 | status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1); | 1407 | status = cpu_to_le16(NVME_SC_INTERNAL << 1); |
1408 | goto done; | 1408 | goto done; |
1409 | } | 1409 | } |
1410 | result.u64 = 0; | 1410 | result.u64 = 0; |
@@ -1421,7 +1421,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req) | |||
1421 | freq->transferred_length || | 1421 | freq->transferred_length || |
1422 | op->rsp_iu.status_code || | 1422 | op->rsp_iu.status_code || |
1423 | sqe->common.command_id != cqe->command_id)) { | 1423 | sqe->common.command_id != cqe->command_id)) { |
1424 | status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1); | 1424 | status = cpu_to_le16(NVME_SC_INTERNAL << 1); |
1425 | goto done; | 1425 | goto done; |
1426 | } | 1426 | } |
1427 | result = cqe->result; | 1427 | result = cqe->result; |
@@ -1429,7 +1429,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req) | |||
1429 | break; | 1429 | break; |
1430 | 1430 | ||
1431 | default: | 1431 | default: |
1432 | status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1); | 1432 | status = cpu_to_le16(NVME_SC_INTERNAL << 1); |
1433 | goto done; | 1433 | goto done; |
1434 | } | 1434 | } |
1435 | 1435 | ||