diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-02-24 08:49:41 -0500 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:52:59 -0400 |
commit | e6d15f79f997a98b3a69abbc462fc9041cc1a7b4 (patch) | |
tree | e450940cfa69aaf06ddf00db6a47def3f209236c /drivers/block/nvme.c | |
parent | d8ee9d69f275769aaad40ef7c944565ff8d2d24f (diff) |
NVMe: Reduce maximum queue depth by 1
The spec says we're not allowed to completely fill the submission queue.
Solve this by reducing the number of allocatable cmdids by 1.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block/nvme.c')
-rw-r--r-- | drivers/block/nvme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 562d75a0fc50..45bfae1ebd50 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c | |||
@@ -156,7 +156,7 @@ static struct nvme_cmd_info *nvme_cmd_info(struct nvme_queue *nvmeq) | |||
156 | static int alloc_cmdid(struct nvme_queue *nvmeq, void *ctx, int handler, | 156 | static int alloc_cmdid(struct nvme_queue *nvmeq, void *ctx, int handler, |
157 | unsigned timeout) | 157 | unsigned timeout) |
158 | { | 158 | { |
159 | int depth = nvmeq->q_depth; | 159 | int depth = nvmeq->q_depth - 1; |
160 | struct nvme_cmd_info *info = nvme_cmd_info(nvmeq); | 160 | struct nvme_cmd_info *info = nvme_cmd_info(nvmeq); |
161 | int cmdid; | 161 | int cmdid; |
162 | 162 | ||