Skip to content

Commit

Permalink
hw/block/nvme: fix set feature for error recovery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gollu Appalanaidu authored and birkelund committed Feb 8, 2021
1 parent 044f187 commit 56990c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/block/nvme.c
Expand Up @@ -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++) {
Expand Down

0 comments on commit 56990c7

Please sign in to comment.