Skip to content

Commit 4999568

Browse files
guixinliu1995keithbusch
authored andcommitted
nvme-fabrics: check max outstanding commands
Maxcmd is mandatory for fabrics, check it early to identify the root cause instead of waiting for it to propagate to "sqsize" and "allocing queue". By the way, change nvme_check_ctrl_fabric_info() to nvmf_validate_identify_ctrl(). Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Guixin Liu <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent f096ba3 commit 4999568

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,6 +3119,11 @@ static int nvme_check_ctrl_fabric_info(struct nvme_ctrl *ctrl, struct nvme_id_ct
31193119
return -EINVAL;
31203120
}
31213121

3122+
if (!ctrl->maxcmd) {
3123+
dev_err(ctrl->device, "Maximum outstanding commands is 0\n");
3124+
return -EINVAL;
3125+
}
3126+
31223127
return 0;
31233128
}
31243129

0 commit comments

Comments
 (0)