aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Gurtovoy <[email protected]>2023-12-20 11:27:45 +0200
committerKeith Busch <[email protected]>2023-12-21 09:18:25 -0800
commit7642138e17529b48b43c69faf5c6f45bb2b64234 (patch)
tree8cff929a9fbdc0b5554c63b992d71052db3d86b4
parent536ecccbaf1fe6319c3af635596748c19208e627 (diff)
nvme-fabrics: don't check discovery ioccsz/iorcsz
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 <[email protected]> Tested-by: Daniel Wagner <[email protected]> Signed-off-by: Max Gurtovoy <[email protected]> Signed-off-by: Keith Busch <[email protected]>
-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 22dae2a26ba4..d144d1acb09a 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3032,14 +3032,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);