Skip to content

Commit 26c6822

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
nvme-fabrics: allow nvmf_connect_io_queue to poll
Preparation for polling support for fabrics. Polling support means that our completion queues are not generating any interrupts which means we need to poll for the nvmf io queue connect as well. Reviewed by Steve Wise <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 6287b51 commit 26c6822

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

drivers/nvme/host/fabrics.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ EXPORT_SYMBOL_GPL(nvmf_connect_admin_queue);
441441
* > 0: NVMe error status code
442442
* < 0: Linux errno error code
443443
*/
444-
int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
444+
int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid, bool poll)
445445
{
446446
struct nvme_command cmd;
447447
struct nvmf_connect_data *data;
@@ -468,7 +468,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
468468

469469
ret = __nvme_submit_sync_cmd(ctrl->connect_q, &cmd, &res,
470470
data, sizeof(*data), 0, qid, 1,
471-
BLK_MQ_REQ_RESERVED | BLK_MQ_REQ_NOWAIT, false);
471+
BLK_MQ_REQ_RESERVED | BLK_MQ_REQ_NOWAIT, poll);
472472
if (ret) {
473473
nvmf_log_connect_error(ctrl, ret, le32_to_cpu(res.u32),
474474
&cmd, data);

drivers/nvme/host/fabrics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val);
168168
int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val);
169169
int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val);
170170
int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl);
171-
int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid);
171+
int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid, bool poll);
172172
int nvmf_register_transport(struct nvmf_transport_ops *ops);
173173
void nvmf_unregister_transport(struct nvmf_transport_ops *ops);
174174
void nvmf_free_options(struct nvmf_ctrl_options *opts);

drivers/nvme/host/fc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,7 @@ nvme_fc_connect_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
19751975
(qsize / 5));
19761976
if (ret)
19771977
break;
1978-
ret = nvmf_connect_io_queue(&ctrl->ctrl, i);
1978+
ret = nvmf_connect_io_queue(&ctrl->ctrl, i, false);
19791979
if (ret)
19801980
break;
19811981

drivers/nvme/host/rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static int nvme_rdma_start_queue(struct nvme_rdma_ctrl *ctrl, int idx)
598598
int ret;
599599

600600
if (idx)
601-
ret = nvmf_connect_io_queue(&ctrl->ctrl, idx);
601+
ret = nvmf_connect_io_queue(&ctrl->ctrl, idx, false);
602602
else
603603
ret = nvmf_connect_admin_queue(&ctrl->ctrl);
604604

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@ static int nvme_tcp_start_queue(struct nvme_ctrl *nctrl, int idx)
13941394
int ret;
13951395

13961396
if (idx)
1397-
ret = nvmf_connect_io_queue(nctrl, idx);
1397+
ret = nvmf_connect_io_queue(nctrl, idx, false);
13981398
else
13991399
ret = nvmf_connect_admin_queue(nctrl);
14001400

drivers/nvme/target/loop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static int nvme_loop_connect_io_queues(struct nvme_loop_ctrl *ctrl)
345345
int i, ret;
346346

347347
for (i = 1; i < ctrl->ctrl.queue_count; i++) {
348-
ret = nvmf_connect_io_queue(&ctrl->ctrl, i);
348+
ret = nvmf_connect_io_queue(&ctrl->ctrl, i, false);
349349
if (ret)
350350
return ret;
351351
set_bit(NVME_LOOP_Q_LIVE, &ctrl->queues[i].flags);

0 commit comments

Comments
 (0)