From: Kamaljit Singh <kamaljit.singh@opensource.wdc.com>
To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: cassel@kernel.org, dlemoal@kernel.org, kamaljit.singh1@wdc.com,
Kamaljit Singh <kamaljit.singh@opensource.wdc.com>
Subject: [PATCH v2 2/2] nvme-core: do ioccsz/iorcsz validation only for I/O controllers
Date: Fri, 5 Sep 2025 16:25:50 -0700 [thread overview]
Message-ID: <20250905232550.1950307-3-kamaljit.singh@opensource.wdc.com> (raw)
In-Reply-To: <20250905232550.1950307-1-kamaljit.singh@opensource.wdc.com>
An administrative controller does not support I/O queues, hence it
should ignore existing checks for IOCCSZ/IORCSZ. Currently, these checks
only exclude a discovery controller but need to also exclude an
administrative controller.
Signed-off-by: Kamaljit Singh <kamaljit.singh@opensource.wdc.com>
---
drivers/nvme/host/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index fab672e50510..ef6f84d677d8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3496,14 +3496,14 @@ static int nvme_check_ctrl_fabric_info(struct nvme_ctrl *ctrl, struct nvme_id_ct
return -EINVAL;
}
- if (!nvme_discovery_ctrl(ctrl) && ctrl->ioccsz < 4) {
+ if (nvme_is_io_ctrl(ctrl) && ctrl->ioccsz < 4) {
dev_err(ctrl->device,
"I/O queue command capsule supported size %d < 4\n",
ctrl->ioccsz);
return -EINVAL;
}
- if (!nvme_discovery_ctrl(ctrl) && ctrl->iorcsz < 1) {
+ if (nvme_is_io_ctrl(ctrl) && ctrl->iorcsz < 1) {
dev_err(ctrl->device,
"I/O queue response capsule supported size %d < 1\n",
ctrl->iorcsz);
--
2.43.0
next prev parent reply other threads:[~2025-09-05 23:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 23:25 [PATCH v2 0/2] Preclude IOCCSZ/IORCSZ validation for admin controller connect Kamaljit Singh
2025-09-05 23:25 ` [PATCH v2 1/2] nvme-core: add method to check for an I/O controller Kamaljit Singh
2025-09-08 12:56 ` Hannes Reinecke
2025-09-17 21:42 ` Kamaljit Singh
2025-09-05 23:25 ` Kamaljit Singh [this message]
2025-09-08 12:57 ` [PATCH v2 2/2] nvme-core: do ioccsz/iorcsz validation only for I/O controllers Hannes Reinecke
2025-09-17 21:43 ` Kamaljit Singh
2025-09-17 22:41 ` [PATCH v2 0/2] Preclude IOCCSZ/IORCSZ validation for admin controller connect Keith Busch
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=20250905232550.1950307-3-kamaljit.singh@opensource.wdc.com \
--to=kamaljit.singh@opensource.wdc.com \
--cc=axboe@kernel.dk \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=kamaljit.singh1@wdc.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®