aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-03-30 14:29:12 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-14 20:40:32 -0400
commit6f9e7f01b69bc2d6021e4ab827e1fd78c82cbc52 (patch)
tree813c6e9f5e5cfe8e67444a00b5ece09a878462cd /drivers/infiniband
parente182d6828d3144f7206829398c95fc14b78e9bbc (diff)
IB/srpt: Remove use of transport_do_task_sg_chain()
With the modern target core, se_cmd->t_data_sg already points to a sglist that covers the whole command. So task_sg chaining is needless overhead and obfuscation -- instead of splicing the split up task sglists back into one list, we can just use the original list directly. Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 69e2ad06e515..1e3866eb80a8 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));
@@ -4003,9 +4002,6 @@ static int __init srpt_init_module(void)
4003 4002
4004 srpt_target->tf_ops = srpt_template; 4003 srpt_target->tf_ops = srpt_template;
4005 4004
4006 /* Enable SG chaining */
4007 srpt_target->tf_ops.task_sg_chaining = true;
4008
4009 /* 4005 /*
4010 * Set up default attribute lists. 4006 * Set up default attribute lists.
4011 */ 4007 */