diff options
author | Gollu Appalanaidu <anaidu.gollu@samsung.com> | 2021-01-24 21:24:40 +0530 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-02-08 21:15:54 +0100 |
commit | 56990c777a635ded6e2f191c470ca6410cf5c11a (patch) | |
tree | a78b1ca09dba048e9e43e746d58a0af04f810f74 /hw/block | |
parent | 044f1876b0b00a970e65b99d9be21925cdd7dc6b (diff) | |
download | qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.zip qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.gz qemu-56990c777a635ded6e2f191c470ca6410cf5c11a.tar.bz2 |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40784bd..b3d072c 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++) { |