]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
NVMe: Use a retryable error code on reset
authorKeith Busch <keith.busch@intel.com>
Mon, 4 Jan 2016 16:10:56 +0000 (09:10 -0700)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 16:00:05 +0000 (09:00 -0700)
BugLink: http://bugs.launchpad.net/bugs/1531539
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>
(cherry picked from commit 1d49c38c4865c596b01b31a52540275c1bb383e7)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/nvme/host/pci.c

index d0b37b9a43796df9ff2132301d19176afa1075ed..7bd8b449c214d1028c9416b29c5529aaf83943ce 100644 (file)
@@ -1017,7 +1017,7 @@ static void nvme_cancel_queue_ios(struct request *req, void *data, bool reserved
        dev_warn(nvmeq->q_dmadev,
                 "Cancelling I/O %d QID %d\n", req->tag, nvmeq->qid);
 
-       status = NVME_SC_CANCELLED;
+       status = NVME_SC_ABORT_REQ;
        if (blk_queue_dying(req->q))
                status |= NVME_SC_DNR;
        blk_mq_complete_request(req, status);