Skip to content

Commit

Permalink
nvme-pci: set ctrl sqsize to the device q_depth
Browse files Browse the repository at this point in the history
Align with what the rest of the transports are doing.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
  • Loading branch information
Sagi Grimberg committed Aug 29, 2019
1 parent 4fba445 commit aa22c8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,6 +2314,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)

dev->q_depth = min_t(int, NVME_CAP_MQES(dev->ctrl.cap) + 1,
io_queue_depth);
dev->ctrl.sqsize = dev->q_depth - 1; /* 0's based queue depth */
dev->db_stride = 1 << NVME_CAP_STRIDE(dev->ctrl.cap);
dev->dbs = dev->bar + 4096;

Expand Down

0 comments on commit aa22c8e

Please sign in to comment.