From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <sagi@grimberg.me>, Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 2/2] nvmet: handle disc default command set identifier
Date: Thu, 7 Apr 2022 19:39:30 -0700 [thread overview]
Message-ID: <20220408023930.85774-3-kch@nvidia.com> (raw)
In-Reply-To: <20220408023930.85774-1-kch@nvidia.com>
Similar to previous patch handle identify command cns value
NVME_ID_CNS_CS_CTRL when executing nvme_admin_identify for discovery
controller.
This is needed to mask out the errors reported by the blktest nvme/002.
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/nvme/target/discovery.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/discovery.c b/drivers/nvme/target/discovery.c
index c2162eef8ce1..34c7ed055674 100644
--- a/drivers/nvme/target/discovery.c
+++ b/drivers/nvme/target/discovery.c
@@ -254,7 +254,11 @@ static void nvmet_execute_disc_identify(struct nvmet_req *req)
if (!nvmet_check_transfer_len(req, NVME_IDENTIFY_DATA_SIZE))
return;
- if (req->cmd->identify.cns != NVME_ID_CNS_CTRL) {
+ switch (req->cmd->identify.cns) {
+ case NVME_ID_CNS_CTRL:
+ case NVME_ID_CNS_CS_CTRL:
+ break;
+ default:
req->error_loc = offsetof(struct nvme_identify, cns);
status = NVME_SC_INVALID_FIELD | NVME_SC_DNR;
goto out;
--
2.29.0
next prev parent reply other threads:[~2022-04-08 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 2:39 [PATCH 0/2] nvmet: handle missing cns and csi values Chaitanya Kulkarni
2022-04-08 2:39 ` [PATCH 1/2] nvmet: handle admin default command set identifier Chaitanya Kulkarni
2022-04-08 5:45 ` Christoph Hellwig
2022-04-08 2:39 ` Chaitanya Kulkarni [this message]
2022-04-08 5:45 ` [PATCH 2/2] nvmet: handle disc " Christoph Hellwig
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=20220408023930.85774-3-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.