Commit e85037a2 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Christoph Hellwig

nvme-tcp: don't ask if controller is fabrics

For sure we are a fabric driver.
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent e9c2edc0
...@@ -1565,8 +1565,7 @@ static void nvme_tcp_destroy_io_queues(struct nvme_ctrl *ctrl, bool remove) ...@@ -1565,8 +1565,7 @@ static void nvme_tcp_destroy_io_queues(struct nvme_ctrl *ctrl, bool remove)
{ {
nvme_tcp_stop_io_queues(ctrl); nvme_tcp_stop_io_queues(ctrl);
if (remove) { if (remove) {
if (ctrl->ops->flags & NVME_F_FABRICS) blk_cleanup_queue(ctrl->connect_q);
blk_cleanup_queue(ctrl->connect_q);
blk_mq_free_tag_set(ctrl->tagset); blk_mq_free_tag_set(ctrl->tagset);
} }
nvme_tcp_free_io_queues(ctrl); nvme_tcp_free_io_queues(ctrl);
...@@ -1587,12 +1586,10 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new) ...@@ -1587,12 +1586,10 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
goto out_free_io_queues; goto out_free_io_queues;
} }
if (ctrl->ops->flags & NVME_F_FABRICS) { ctrl->connect_q = blk_mq_init_queue(ctrl->tagset);
ctrl->connect_q = blk_mq_init_queue(ctrl->tagset); if (IS_ERR(ctrl->connect_q)) {
if (IS_ERR(ctrl->connect_q)) { ret = PTR_ERR(ctrl->connect_q);
ret = PTR_ERR(ctrl->connect_q); goto out_free_tag_set;
goto out_free_tag_set;
}
} }
} else { } else {
blk_mq_update_nr_hw_queues(ctrl->tagset, blk_mq_update_nr_hw_queues(ctrl->tagset,
...@@ -1606,7 +1603,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new) ...@@ -1606,7 +1603,7 @@ static int nvme_tcp_configure_io_queues(struct nvme_ctrl *ctrl, bool new)
return 0; return 0;
out_cleanup_connect_q: out_cleanup_connect_q:
if (new && (ctrl->ops->flags & NVME_F_FABRICS)) if (new)
blk_cleanup_queue(ctrl->connect_q); blk_cleanup_queue(ctrl->connect_q);
out_free_tag_set: out_free_tag_set:
if (new) if (new)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment