[PATCH 1/1] nvme-fabrics: don't check ioccsz/iorcsz for discovery
Max Gurtovoy
mgurtovoy at nvidia.com
Wed Dec 20 01:27:45 PST 2023
IOCCSZ and IORCSZ are reserved for discovery controllers. Avoid checking
their values during identify controller phase.
Fixes: 2fcd3ab39826 ("nvme-fabrics: check ioccsz and iorcsz")
Reported-by: Daniel Wagner <dwagner at suse.de>
Tested-by: Daniel Wagner <dwagner at suse.de>
Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.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 ee2e4c49892d..b218ac88fcf8 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3068,14 +3068,14 @@ static int nvme_check_ctrl_fabric_info(struct nvme_ctrl *ctrl, struct nvme_id_ct
return -EINVAL;
}
- if (ctrl->ioccsz < 4) {
+ if (!nvme_discovery_ctrl(ctrl) && ctrl->ioccsz < 4) {
dev_err(ctrl->device,
"I/O queue command capsule supported size %d < 4\n",
ctrl->ioccsz);
return -EINVAL;
}
- if (ctrl->iorcsz < 1) {
+ if (!nvme_discovery_ctrl(ctrl) && ctrl->iorcsz < 1) {
dev_err(ctrl->device,
"I/O queue response capsule supported size %d < 1\n",
ctrl->iorcsz);
--
2.18.1
More information about the Linux-nvme
mailing list