diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2019-07-23 02:06:53 +0200 |
---|---|---|
committer | Sagi Grimberg <sagi@grimberg.me> | 2019-08-29 21:55:00 +0200 |
commit | c0f2f45be2976abe973c8cd544f38e2d928771b0 (patch) | |
tree | 040efcf8dc137e451ff40aba4550f7089eb545b5 /drivers/nvme/target | |
parent | nvme-pci: set ctrl sqsize to the device q_depth (diff) | |
download | linux-c0f2f45be2976abe973c8cd544f38e2d928771b0.tar.xz linux-c0f2f45be2976abe973c8cd544f38e2d928771b0.zip |
nvme: move sqsize setting to the core
nvme_enable_ctrl reads the cap register right after, so
no need to do that locally in the transport driver. Have
sqsize setting in nvme_init_identify.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/loop.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c index 95c8f1732215..ec0bc57d26fc 100644 --- a/drivers/nvme/target/loop.c +++ b/drivers/nvme/target/loop.c @@ -369,17 +369,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) set_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[0].flags); - error = nvmf_reg_read64(&ctrl->ctrl, NVME_REG_CAP, &ctrl->ctrl.cap); - if (error) { - dev_err(ctrl->ctrl.device, - "prop_get NVME_REG_CAP failed\n"); - goto out_cleanup_queue; - } - - ctrl->ctrl.sqsize = - min_t(int, NVME_CAP_MQES(ctrl->ctrl.cap), ctrl->ctrl.sqsize); - - error = nvme_enable_ctrl(&ctrl->ctrl, ctrl->ctrl.cap); + error = nvme_enable_ctrl(&ctrl->ctrl); if (error) goto out_cleanup_queue; |