All of lore.kernel.org
 help / color / mirror / Atom feed
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 1/2] nvmet: handle admin default command set identifier
Date: Thu, 7 Apr 2022 19:39:29 -0700	[thread overview]
Message-ID: <20220408023930.85774-2-kch@nvidia.com> (raw)
In-Reply-To: <20220408023930.85774-1-kch@nvidia.com>

The NVMeOF in kernel host when configuring non-mdts limits uses
idnetify controller cns value to NVME_ID_CNS_CS_CTRL and csi value to
NVME_CSI_NVM. In target code we only handle case for NVME_ID_CNS_CS_CTRL
and NVME_CSI_ZNS when CONFIG_BLK_DEV_ZONED is set.

Handle missing case for CONFIG_BLK_DEV_ZONED and !CONFIG_BLK_DEV_ZONED
so it can handle NVME_ID_CNS_CS_CTRL with NVME_CSI_NVM.

This is needed to mask out the errors reported by the blktest nvme/012.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/target/admin-cmd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 397daaf51f1b..e5eea2f0ac9c 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -718,9 +718,16 @@ static void nvmet_execute_identify(struct nvmet_req *req)
 			switch (req->cmd->identify.csi) {
 			case NVME_CSI_ZNS:
 				return nvmet_execute_identify_cns_cs_ctrl(req);
+			case NVME_CSI_NVM:
+				return nvmet_execute_identify_ctrl(req);
 			default:
 				break;
 			}
+		} else {
+			switch (req->cmd->identify.csi) {
+			case NVME_CSI_NVM:
+				return nvmet_execute_identify_ctrl(req);
+			}
 		}
 		break;
 	case NVME_ID_CNS_NS_ACTIVE_LIST:
-- 
2.29.0



  reply	other threads:[~2022-04-08  2:54 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 ` Chaitanya Kulkarni [this message]
2022-04-08  5:45   ` [PATCH 1/2] nvmet: handle admin default command set identifier Christoph Hellwig
2022-04-08  2:39 ` [PATCH 2/2] nvmet: handle disc " Chaitanya Kulkarni
2022-04-08  5:45   ` 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-2-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.