diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-04-06 02:15:51 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-09 15:58:09 -0400 |
commit | 1af76ddaa80e3bca8001b535e44aaaebd3e1907e (patch) | |
tree | f56bc7ce2028ebefc97d1a16e2928bc7a69dba7a | |
parent | 096e9e912ba8c973213e57701e0591e01064be26 (diff) |
nvme-rdma: 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 <Darren.Trapp@cavium.com>
Reported-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | drivers/nvme/host/rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 47a479f26e5d..16f84eb0b95e 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c | |||
@@ -1606,7 +1606,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl) | |||
1606 | } | 1606 | } |
1607 | 1607 | ||
1608 | ctrl->ctrl.sqsize = | 1608 | ctrl->ctrl.sqsize = |
1609 | min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize); | 1609 | min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize); |
1610 | 1610 | ||
1611 | error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap); | 1611 | error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap); |
1612 | if (error) | 1612 | if (error) |