diff options
author | Roland Dreier <roland@purestorage.com> | 2012-03-30 14:29:11 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-04-14 20:40:31 -0400 |
commit | e182d6828d3144f7206829398c95fc14b78e9bbc (patch) | |
tree | 7d6be3d901dd51d20fac3690f973e6b00e7d71ef /drivers | |
parent | bebe2fdc17835f9330de2a15c8ca393f92acd250 (diff) |
tcm_fc: 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>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 18 | ||||
-rw-r--r-- | drivers/target/tcm_fc/tfc_conf.c | 3 | ||||
-rw-r--r-- | drivers/target/tcm_fc/tfc_io.c | 2 |
3 files changed, 5 insertions, 18 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index a375f257aabc..f03fb9730f5b 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -215,20 +215,10 @@ int ft_write_pending(struct se_cmd *se_cmd) | |||
215 | */ | 215 | */ |
216 | if ((ep->xid <= lport->lro_xid) && | 216 | if ((ep->xid <= lport->lro_xid) && |
217 | (fh->fh_r_ctl == FC_RCTL_DD_DATA_DESC)) { | 217 | (fh->fh_r_ctl == FC_RCTL_DD_DATA_DESC)) { |
218 | if (se_cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) { | 218 | if ((se_cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) && |
219 | /* | 219 | lport->tt.ddp_target(lport, ep->xid, |
220 | * cmd may have been broken up into multiple | 220 | se_cmd->t_data_sg, |
221 | * tasks. Link their sgs together so we can | 221 | se_cmd->t_data_nents)) |
222 | * operate on them all at once. | ||
223 | */ | ||
224 | transport_do_task_sg_chain(se_cmd); | ||
225 | cmd->sg = se_cmd->t_tasks_sg_chained; | ||
226 | cmd->sg_cnt = | ||
227 | se_cmd->t_tasks_sg_chained_no; | ||
228 | } | ||
229 | if (cmd->sg && lport->tt.ddp_target(lport, ep->xid, | ||
230 | cmd->sg, | ||
231 | cmd->sg_cnt)) | ||
232 | cmd->was_ddp_setup = 1; | 222 | cmd->was_ddp_setup = 1; |
233 | } | 223 | } |
234 | } | 224 | } |
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c index 2948dc944619..9501844fae2d 100644 --- a/drivers/target/tcm_fc/tfc_conf.c +++ b/drivers/target/tcm_fc/tfc_conf.c | |||
@@ -576,9 +576,6 @@ int ft_register_configfs(void) | |||
576 | } | 576 | } |
577 | fabric->tf_ops = ft_fabric_ops; | 577 | fabric->tf_ops = ft_fabric_ops; |
578 | 578 | ||
579 | /* Allowing support for task_sg_chaining */ | ||
580 | fabric->tf_ops.task_sg_chaining = 1; | ||
581 | |||
582 | /* | 579 | /* |
583 | * Setup default attribute lists for various fabric->tf_cit_tmpl | 580 | * Setup default attribute lists for various fabric->tf_cit_tmpl |
584 | */ | 581 | */ |
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c index dc7c0db26e20..071a505f98fc 100644 --- a/drivers/target/tcm_fc/tfc_io.c +++ b/drivers/target/tcm_fc/tfc_io.c | |||
@@ -228,7 +228,7 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp) | |||
228 | "payload, Frame will be dropped if" | 228 | "payload, Frame will be dropped if" |
229 | "'Sequence Initiative' bit in f_ctl is" | 229 | "'Sequence Initiative' bit in f_ctl is" |
230 | "not set\n", __func__, ep->xid, f_ctl, | 230 | "not set\n", __func__, ep->xid, f_ctl, |
231 | cmd->sg, cmd->sg_cnt); | 231 | se_cmd->t_data_sg, se_cmd->t_data_nents); |
232 | /* | 232 | /* |
233 | * Invalidate HW DDP context if it was setup for respective | 233 | * Invalidate HW DDP context if it was setup for respective |
234 | * command. Invalidation of HW DDP context is requited in both | 234 | * command. Invalidation of HW DDP context is requited in both |