Initialize max_hw_sectors a little earlier so that
nvme_alloc_admin_tag_set can rely on it to set the initial queue limits.
Signed-off-by: Christoph Hellwig <hch@lst.de>
if (error)
return error;
ctrl->ctrl.queue_count = 1;
+ ctrl->ctrl.max_hw_sectors =
+ (NVME_LOOP_MAX_SEGMENTS - 1) << PAGE_SECTORS_SHIFT;
error = nvme_alloc_admin_tag_set(&ctrl->ctrl, &ctrl->admin_tag_set,
&nvme_loop_admin_mq_ops,
if (error)
goto out_cleanup_tagset;
- ctrl->ctrl.max_hw_sectors =
- (NVME_LOOP_MAX_SEGMENTS - 1) << PAGE_SECTORS_SHIFT;
-
nvme_unquiesce_admin_queue(&ctrl->ctrl);
error = nvme_init_ctrl_finish(&ctrl->ctrl, false);