From: Keith Busch Date: Mon, 4 Jan 2016 16:10:56 +0000 (-0700) Subject: NVMe: Use a retryable error code on reset X-Git-Tag: v4.1.12-102.0.20170601_1400~142 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=db51ddd3c746c1ca517c64a6b916945d25ff9bb6;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Jens Axboe (cherry picked from commit 1d49c38c4865c596b01b31a52540275c1bb383e7) Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 5777f2b9efa8..d1bbfc45cd18 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1078,7 +1078,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);