From: Martin George <martinus.gpy@gmail.com>
To: linux-nvme@lists.infradead.org
Cc: Martin George <marting@netapp.com>
Subject: [PATCH] nvme-core: avoid identify with CNS 06h to discovery controller
Date: Sat, 11 Mar 2023 22:56:03 +0530 [thread overview]
Message-ID: <20230311172603.3800-1-marting@netapp.com> (raw)
nvme_init_non_mdts_limits() currenty invokes an identify command with
CNS 06h to both discovery and i/o controllers. But as per the NVMe-oF
specification, this is not supported on discovery controllers:
"The Discovery controller shall support the Identify command with a
CNS value of 01h (Identify Controller data structure); all other CNS
values are reserved."
So ensure this identify command with CNS 06h is sent to i/o controllers
alone and not to discovery controllers.
Signed-off-by: Martin George <marting@netapp.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d4be525f8100..62d1048c6506 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3063,7 +3063,7 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
else
ctrl->max_zeroes_sectors = 0;
- if (nvme_ctrl_limited_cns(ctrl))
+ if (nvme_ctrl_limited_cns(ctrl) || nvme_discovery_ctrl(ctrl))
return 0;
id = kzalloc(sizeof(*id), GFP_KERNEL);
--
2.34.1
next reply other threads:[~2023-03-11 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 17:26 Martin George [this message]
2023-03-15 13:47 ` [PATCH] nvme-core: avoid identify with CNS 06h to discovery controller Christoph Hellwig
2023-03-16 8:34 ` Martin George
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=20230311172603.3800-1-marting@netapp.com \
--to=martinus.gpy@gmail.com \
--cc=linux-nvme@lists.infradead.org \
--cc=marting@netapp.com \
/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.