summaryrefslogtreecommitdiffstats
path: root/hw/block
diff options
context:
space:
mode:
authorGollu Appalanaidu2021-01-24 16:54:40 +0100
committerKlaus Jensen2021-02-08 21:15:54 +0100
commit56990c777a635ded6e2f191c470ca6410cf5c11a (patch)
treea78b1ca09dba048e9e43e746d58a0af04f810f74 /hw/block
parenthw/block/nvme: error if drive less than a zone size (diff)
downloadqemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.gz
qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.xz
qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.zip
hw/block/nvme: fix set feature for error recovery
Only enable DULBE if the namespace supports it. Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nvme.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 40784bd908..b3d072c8b2 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -3396,7 +3396,9 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req)
}
assert(ns);
- ns->features.err_rec = dw11;
+ if (NVME_ID_NS_NSFEAT_DULBE(ns->id_ns.nsfeat)) {
+ ns->features.err_rec = dw11;
+ }
break;
case NVME_VOLATILE_WRITE_CACHE:
for (i = 1; i <= n->num_namespaces; i++) {