Skip to content

Commit

Permalink
IB/srpt: Remove use of transport_do_task_sg_chain()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Apr 15, 2012
1 parent e182d68 commit 6f9e7f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
dir = cmd->data_direction;
BUG_ON(dir == DMA_NONE);

transport_do_task_sg_chain(cmd);
ioctx->sg = sg = sg_orig = cmd->t_tasks_sg_chained;
ioctx->sg_cnt = sg_cnt = cmd->t_tasks_sg_chained_no;
ioctx->sg = sg = sg_orig = cmd->t_data_sg;
ioctx->sg_cnt = sg_cnt = cmd->t_data_nents;

count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
opposite_dma_dir(dir));
Expand Down Expand Up @@ -4003,9 +4002,6 @@ static int __init srpt_init_module(void)

srpt_target->tf_ops = srpt_template;

/* Enable SG chaining */
srpt_target->tf_ops.task_sg_chaining = true;

/*
* Set up default attribute lists.
*/
Expand Down

0 comments on commit 6f9e7f0

Please sign in to comment.