From: Gollu Appalanaidu <anaidu.go...@samsung.com> Only enable DULBE if the namespace supports it.
Signed-off-by: Gollu Appalanaidu <anaidu.go...@samsung.com> Reviewed-by: Klaus Jensen <k.jen...@samsung.com> Reviewed-by: Keith Busch <kbu...@kernel.org> Signed-off-by: Klaus Jensen <k.jen...@samsung.com> --- hw/block/nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40784bd908fb..b3d072c8b2bb 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++) { -- 2.30.0