summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamaljit Singh <kamaljit.singh@opensource.wdc.com>2025-09-05 16:25:50 -0700
committerKeith Busch <kbusch@kernel.org>2025-09-23 15:38:28 -0700
commitf7e9a615302fec524445da213745609a06b9914d (patch)
tree3606fe71b39e565ebcf9c7ad3e6080a0eb0ba48a
parenta5b852797411a65b99b467766a03be8f24284ddc (diff)
nvme-core: do ioccsz/iorcsz validation only for I/O controllers
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> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 0f20adcebcf1..edfe7a267a4b 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3492,14 +3492,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);