Skip to content

Commit c6c64a9

Browse files
sagigrimbergaxboe
authored andcommitted
nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability
both our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong. Reported-by: Trapp, Darren <[email protected]> Reported-by: Daniel Verkamp <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 1af76dd commit c6c64a9

File tree

1 file changed

+1
-1
lines changed
  • drivers/nvme/host

1 file changed

+1
-1
lines changed

drivers/nvme/host/fc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ nvme_fc_configure_admin_queue(struct nvme_fc_ctrl *ctrl)
20232023
}
20242024

20252025
ctrl->ctrl.sqsize =
2026-
min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize);
2026+
min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize);
20272027

20282028
error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap);
20292029
if (error)

0 commit comments

Comments
 (0)