diff options
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index bdf25593b81c..d4c95cc2ae54 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -353,17 +353,11 @@ static void ft_send_resp_code_and_free(struct ft_cmd *cmd, | |||
353 | */ | 353 | */ |
354 | static void ft_send_tm(struct ft_cmd *cmd) | 354 | static void ft_send_tm(struct ft_cmd *cmd) |
355 | { | 355 | { |
356 | struct se_tmr_req *tmr; | ||
357 | struct fcp_cmnd *fcp; | 356 | struct fcp_cmnd *fcp; |
358 | struct ft_sess *sess; | 357 | struct ft_sess *sess; |
359 | int rc; | 358 | int rc; |
360 | u8 tm_func; | 359 | u8 tm_func; |
361 | 360 | ||
362 | transport_init_se_cmd(&cmd->se_cmd, &ft_configfs->tf_ops, | ||
363 | cmd->sess->se_sess, 0, DMA_NONE, 0, | ||
364 | &cmd->ft_sense_buffer[0]); | ||
365 | target_get_sess_cmd(cmd->sess->se_sess, &cmd->se_cmd, false); | ||
366 | |||
367 | fcp = fc_frame_payload_get(cmd->req_frame, sizeof(*fcp)); | 361 | fcp = fc_frame_payload_get(cmd->req_frame, sizeof(*fcp)); |
368 | 362 | ||
369 | switch (fcp->fc_tm_flags) { | 363 | switch (fcp->fc_tm_flags) { |
@@ -392,6 +386,11 @@ static void ft_send_tm(struct ft_cmd *cmd) | |||
392 | return; | 386 | return; |
393 | } | 387 | } |
394 | 388 | ||
389 | transport_init_se_cmd(&cmd->se_cmd, &ft_configfs->tf_ops, | ||
390 | cmd->sess->se_sess, 0, DMA_NONE, 0, | ||
391 | &cmd->ft_sense_buffer[0]); | ||
392 | target_get_sess_cmd(cmd->sess->se_sess, &cmd->se_cmd, false); | ||
393 | |||
395 | pr_debug("alloc tm cmd fn %d\n", tm_func); | 394 | pr_debug("alloc tm cmd fn %d\n", tm_func); |
396 | rc = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL); | 395 | rc = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL); |
397 | if (rc < 0) { | 396 | if (rc < 0) { |