aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srpt/ib_srpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/srpt/ib_srpt.c')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index daf21b899999..5f6b7f63cdef 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1099,9 +1099,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
1099 dir = cmd->data_direction; 1099 dir = cmd->data_direction;
1100 BUG_ON(dir == DMA_NONE); 1100 BUG_ON(dir == DMA_NONE);
1101 1101
1102 transport_do_task_sg_chain(cmd); 1102 ioctx->sg = sg = sg_orig = cmd->t_data_sg;
1103 ioctx->sg = sg = sg_orig = cmd->t_tasks_sg_chained; 1103 ioctx->sg_cnt = sg_cnt = cmd->t_data_nents;
1104 ioctx->sg_cnt = sg_cnt = cmd->t_tasks_sg_chained_no;
1105 1104
1106 count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt, 1105 count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
1107 opposite_dma_dir(dir)); 1106 opposite_dma_dir(dir));
@@ -1769,7 +1768,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
1769 kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref); 1768 kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
1770 goto send_sense; 1769 goto send_sense;
1771 } 1770 }
1772 ret = transport_generic_allocate_tasks(cmd, srp_cmd->cdb); 1771 ret = target_setup_cmd_from_cdb(cmd, srp_cmd->cdb);
1773 if (ret < 0) { 1772 if (ret < 0) {
1774 kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref); 1773 kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
1775 if (cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) { 1774 if (cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) {
@@ -4004,9 +4003,6 @@ static int __init srpt_init_module(void)
4004 4003
4005 srpt_target->tf_ops = srpt_template; 4004 srpt_target->tf_ops = srpt_template;
4006 4005
4007 /* Enable SG chaining */
4008 srpt_target->tf_ops.task_sg_chaining = true;
4009
4010 /* 4006 /*
4011 * Set up default attribute lists. 4007 * Set up default attribute lists.
4012 */ 4008 */