aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc/tfc_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/tcm_fc/tfc_cmd.c')
-rw-r--r--drivers/target/tcm_fc/tfc_cmd.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index 1017f56bbbcc..9365e53947ad 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -59,7 +59,8 @@ void ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
59 struct fc_exch *ep; 59 struct fc_exch *ep;
60 struct fc_seq *sp; 60 struct fc_seq *sp;
61 struct se_cmd *se_cmd; 61 struct se_cmd *se_cmd;
62 struct se_mem *mem; 62 struct scatterlist *sg;
63 int count;
63 64
64 if (!(ft_debug_logging & FT_DEBUG_IO)) 65 if (!(ft_debug_logging & FT_DEBUG_IO))
65 return; 66 return;
@@ -71,15 +72,16 @@ void ft_dump_cmd(struct ft_cmd *cmd, const char *caller)
71 caller, cmd, cmd->cdb); 72 caller, cmd, cmd->cdb);
72 printk(KERN_INFO "%s: cmd %p lun %d\n", caller, cmd, cmd->lun); 73 printk(KERN_INFO "%s: cmd %p lun %d\n", caller, cmd, cmd->lun);
73 74
74 printk(KERN_INFO "%s: cmd %p se_num %u len %u se_cmd_flags <0x%x>\n", 75 printk(KERN_INFO "%s: cmd %p data_nents %u len %u se_cmd_flags <0x%x>\n",
75 caller, cmd, se_cmd->t_tasks_se_num, 76 caller, cmd, se_cmd->t_data_nents,
76 se_cmd->data_length, se_cmd->se_cmd_flags); 77 se_cmd->data_length, se_cmd->se_cmd_flags);
77 78
78 list_for_each_entry(mem, &se_cmd->t_mem_list, se_list) 79 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, count)
79 printk(KERN_INFO "%s: cmd %p mem %p page %p " 80 printk(KERN_INFO "%s: cmd %p sg %p page %p "
80 "len 0x%x off 0x%x\n", 81 "len 0x%x off 0x%x\n",
81 caller, cmd, mem, 82 caller, cmd, sg,
82 mem->se_page, mem->se_len, mem->se_off); 83 sg_page(sg), sg->length, sg->offset);
84
83 sp = cmd->seq; 85 sp = cmd->seq;
84 if (sp) { 86 if (sp) {
85 ep = fc_seq_exch(sp); 87 ep = fc_seq_exch(sp);
@@ -256,10 +258,9 @@ int ft_write_pending(struct se_cmd *se_cmd)
256 (fh->fh_r_ctl == FC_RCTL_DD_DATA_DESC)) { 258 (fh->fh_r_ctl == FC_RCTL_DD_DATA_DESC)) {
257 if (se_cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) { 259 if (se_cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB) {
258 /* 260 /*
259 * Map se_mem list to scatterlist, so that 261 * cmd may have been broken up into multiple
260 * DDP can be setup. DDP setup function require 262 * tasks. Link their sgs together so we can
261 * scatterlist. se_mem_list is internal to 263 * operate on them all at once.
262 * TCM/LIO target
263 */ 264 */
264 transport_do_task_sg_chain(se_cmd); 265 transport_do_task_sg_chain(se_cmd);
265 cmd->sg = se_cmd->t_tasks_sg_chained; 266 cmd->sg = se_cmd->t_tasks_sg_chained;