From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
Gollu Appalanaidu <anaidu.gollu@samsung.com>,
Max Reitz <mreitz@redhat.com>, Keith Busch <kbusch@kernel.org>,
Klaus Jensen <its@irrelevant.dk>
Subject: [PATCH 1/3] hw/block/nvme: fix set feature for error recovery
Date: Mon, 25 Jan 2021 09:22:25 +0100 [thread overview]
Message-ID: <20210125082227.20160-2-its@irrelevant.dk> (raw)
In-Reply-To: <20210125082227.20160-1-its@irrelevant.dk>
From: Gollu Appalanaidu <anaidu.gollu@samsung.com>
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>
---
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 21aec90637fa..e7983ff422f2 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
next prev parent reply other threads:[~2021-01-25 8:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 8:22 [PATCH 0/3] hw/block/nvme: misc fixes Klaus Jensen
2021-01-25 8:22 ` Klaus Jensen [this message]
2021-01-25 8:22 ` [PATCH 2/3] hw/block/nvme: fix set feature save field check Klaus Jensen
2021-01-25 8:22 ` [PATCH 3/3] hw/block/nvme: align with existing style Klaus Jensen
2021-01-26 4:59 ` Dmitry Fomichev
2021-01-25 18:02 ` [PATCH 0/3] hw/block/nvme: misc fixes Keith Busch
2021-01-25 18:07 ` Klaus Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210125082227.20160-2-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=anaidu.gollu@samsung.com \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).