aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2016-01-04 11:10:56 -0500
committerJens Axboe <axboe@fb.com>2016-01-12 15:33:35 -0500
commit1d49c38c4865c596b01b31a52540275c1bb383e7 (patch)
treeac596052b7b657d24fa9bb4a6c412423a8bec80f
parente3e9d50cd6ed392bb716e35c134d1e82707c51b4 (diff)
NVMe: Use a retryable error code on reset
A negative status has the "do not retry" bit set, which makes it not retryable. Use a fake status that can potentially be retried on reset. An aborted command's status is overridden by the timeout handler so that it won't be retried, which is necessary to keep initialization from getting into a reset loop. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 30ed2ab2cadb..ac6c7afb2a6e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1017,7 +1017,7 @@ static void nvme_cancel_queue_ios(struct request *req, void *data, bool reserved
1017 dev_warn(nvmeq->q_dmadev, 1017 dev_warn(nvmeq->q_dmadev,
1018 "Cancelling I/O %d QID %d\n", req->tag, nvmeq->qid); 1018 "Cancelling I/O %d QID %d\n", req->tag, nvmeq->qid);
1019 1019
1020 status = NVME_SC_CANCELLED; 1020 status = NVME_SC_ABORT_REQ;
1021 if (blk_queue_dying(req->q)) 1021 if (blk_queue_dying(req->q))
1022 status |= NVME_SC_DNR; 1022 status |= NVME_SC_DNR;
1023 blk_mq_complete_request(req, status); 1023 blk_mq_complete_request(req, status);