Skip to content

Commit f7e9a61

Browse files
Kamaljit Singhkeithbusch
authored andcommitted
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>
1 parent a5b8527 commit f7e9a61

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3492,14 +3492,14 @@ static int nvme_check_ctrl_fabric_info(struct nvme_ctrl *ctrl, struct nvme_id_ct
34923492
return -EINVAL;
34933493
}
34943494

3495-
if (!nvme_discovery_ctrl(ctrl) && ctrl->ioccsz < 4) {
3495+
if (nvme_is_io_ctrl(ctrl) && ctrl->ioccsz < 4) {
34963496
dev_err(ctrl->device,
34973497
"I/O queue command capsule supported size %d < 4\n",
34983498
ctrl->ioccsz);
34993499
return -EINVAL;
35003500
}
35013501

3502-
if (!nvme_discovery_ctrl(ctrl) && ctrl->iorcsz < 1) {
3502+
if (nvme_is_io_ctrl(ctrl) && ctrl->iorcsz < 1) {
35033503
dev_err(ctrl->device,
35043504
"I/O queue response capsule supported size %d < 1\n",
35053505
ctrl->iorcsz);

0 commit comments

Comments
 (0)