public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCHv2] nvme: Return BLK_STS_TARGET if the DNR bit is set
@ 2019-08-07  7:12 Hannes Reinecke
  2019-08-07 14:47 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2019-08-07  7:12 UTC (permalink / raw)


If the DNR bit is set we should not retry the command, even if
the standard status evaluation indicates so.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cc09b81fc7f4..2c6c9460adea 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -274,6 +274,10 @@ void nvme_complete_rq(struct request *req)
 			return;
 		}
 
+		if (nvme_req(req)->status & NVME_SC_DNR) {
+			blk_mq_end_request(req, BLK_STS_TARGET);
+			return;
+		}
 		if (!blk_queue_dying(req->q)) {
 			nvme_retry_req(req);
 			return;
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-07 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07  7:12 [PATCHv2] nvme: Return BLK_STS_TARGET if the DNR bit is set Hannes Reinecke
2019-08-07 14:47 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox