Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-08-21 14:41:42 +0200
committerHannes Reinecke <hare@suse.de>2019-08-21 14:41:42 +0200
commitc4afaf487c20e7e0f034984c2f7fa80f90171b48 (patch)
tree46bf6bcdac51f48f85809876ff1afe9226a579b9
parent58b47126e37ac424acce5efb04e61148f9abab82 (diff)
nvme: Return BLK_STS_TARGET if the DNR bit is set (bsc#1142076).
-rw-r--r--patches.suse/nvme-Return-BLK_STS_TARGET-if-the-DNR-bit-is-set.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.suse/nvme-Return-BLK_STS_TARGET-if-the-DNR-bit-is-set.patch b/patches.suse/nvme-Return-BLK_STS_TARGET-if-the-DNR-bit-is-set.patch
new file mode 100644
index 0000000000..723d7ced63
--- /dev/null
+++ b/patches.suse/nvme-Return-BLK_STS_TARGET-if-the-DNR-bit-is-set.patch
@@ -0,0 +1,36 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Tue, 6 Aug 2019 12:47:17 +0200
+Subject: [PATCH] nvme: Return BLK_STS_TARGET if the DNR bit is set
+References: bsc#1142076
+Patch-Mainline: never, solved differently upstream
+
+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@suse.com>
+---
+ drivers/nvme/host/core.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
+index 6afc37292f28..6faa3a99253a 100644
+--- a/drivers/nvme/host/core.c
++++ b/drivers/nvme/host/core.c
+@@ -265,6 +265,13 @@ void nvme_complete_rq(struct request *req)
+ return;
+ }
+ }
++ /*
++ * Any pathing error might be retried, but the DNR bit takes
++ * precedence. So return BLK_STS_TARGET if the DNR bit is set
++ * to avoid retrying.
++ */
++ if (blk_path_error(status) && nvme_req(req)->status & NVME_SC_DNR)
++ status = BLK_STS_TARGET;
+ blk_mq_end_request(req, status);
+ }
+ EXPORT_SYMBOL_GPL(nvme_complete_rq);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 2517773daa..60081f7731 100644
--- a/series.conf
+++ b/series.conf
@@ -23442,6 +23442,7 @@
patches.suse/nvme-Do-not-remove-namespaces-during-reset.patch
patches.suse/nvme-flush-scan_work-when-resetting-controller.patch
patches.suse/nvme-skip-nvme_update_disk_info-if-the-controller-is.patch
+ patches.suse/nvme-Return-BLK_STS_TARGET-if-the-DNR-bit-is-set.patch
patches.kabi/kabi-drop-LINUX_MIB_TCPWQUEUETOOBIG-snmp-counter.patch
patches.kabi/kabi-move-sysctl_tcp_min_snd_mss-to-preserve-struct-.patch
patches.suse/block-Fix-a-NULL-pointer-dereference-in-generic_make.patch