diff options
author | 2017-04-06 09:15:52 +0300 | |
---|---|---|
committer | 2017-04-09 13:58:11 -0600 | |
commit | c6c64a942c87faa6fca68f5dd208094b8cf61236 (patch) | |
tree | 3f2b8c21af66f49af60222fd5927c7069418aeb8 /drivers/nvme | |
parent | nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability (diff) | |
download | linux-c6c64a942c87faa6fca68f5dd208094b8cf61236.tar.gz linux-c6c64a942c87faa6fca68f5dd208094b8cf61236.tar.bz2 linux-c6c64a942c87faa6fca68f5dd208094b8cf61236.zip |
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 <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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/fc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 9690beb15e69..d996ca73d3be 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -2023,7 +2023,7 @@ nvme_fc_configure_admin_queue(struct nvme_fc_ctrl *ctrl) } ctrl->ctrl.sqsize = - min_t(int, NVME_CAP_MQES(ctrl->cap) + 1, ctrl->ctrl.sqsize); + min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->ctrl.sqsize); error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->cap); if (error) |