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.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index 80fbcde00cb6..6195026cc7b0 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -19,7 +19,6 @@
19 19
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
22#include <linux/version.h>
23#include <generated/utsrelease.h> 22#include <generated/utsrelease.h>
24#include <linux/utsname.h> 23#include <linux/utsname.h>
25#include <linux/init.h> 24#include <linux/init.h>
@@ -115,7 +114,7 @@ void ft_release_cmd(struct se_cmd *se_cmd)
115 114
116void ft_check_stop_free(struct se_cmd *se_cmd) 115void ft_check_stop_free(struct se_cmd *se_cmd)
117{ 116{
118 transport_generic_free_cmd(se_cmd, 0, 0); 117 transport_generic_free_cmd(se_cmd, 0);
119} 118}
120 119
121/* 120/*
@@ -268,9 +267,8 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg)
268 267
269 if (IS_ERR(fp)) { 268 if (IS_ERR(fp)) {
270 /* XXX need to find cmd if queued */ 269 /* XXX need to find cmd if queued */
271 cmd->se_cmd.t_state = TRANSPORT_REMOVE;
272 cmd->seq = NULL; 270 cmd->seq = NULL;
273 transport_generic_free_cmd(&cmd->se_cmd, 0, 0); 271 transport_generic_free_cmd(&cmd->se_cmd, 0);
274 return; 272 return;
275 } 273 }
276 274
@@ -288,7 +286,7 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg)
288 __func__, fh->fh_r_ctl); 286 __func__, fh->fh_r_ctl);
289 ft_invl_hw_context(cmd); 287 ft_invl_hw_context(cmd);
290 fc_frame_free(fp); 288 fc_frame_free(fp);
291 transport_generic_free_cmd(&cmd->se_cmd, 0, 0); 289 transport_generic_free_cmd(&cmd->se_cmd, 0);
292 break; 290 break;
293 } 291 }
294} 292}
@@ -397,7 +395,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
397 } 395 }
398 396
399 pr_debug("alloc tm cmd fn %d\n", tm_func); 397 pr_debug("alloc tm cmd fn %d\n", tm_func);
400 tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func); 398 tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
401 if (!tmr) { 399 if (!tmr) {
402 pr_debug("alloc failed\n"); 400 pr_debug("alloc failed\n");
403 ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED); 401 ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED);
@@ -421,7 +419,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
421 sess = cmd->sess; 419 sess = cmd->sess;
422 transport_send_check_condition_and_sense(&cmd->se_cmd, 420 transport_send_check_condition_and_sense(&cmd->se_cmd,
423 cmd->se_cmd.scsi_sense_reason, 0); 421 cmd->se_cmd.scsi_sense_reason, 0);
424 transport_generic_free_cmd(&cmd->se_cmd, 0, 0); 422 transport_generic_free_cmd(&cmd->se_cmd, 0);
425 ft_sess_put(sess); 423 ft_sess_put(sess);
426 return; 424 return;
427 } 425 }
@@ -628,7 +626,7 @@ static void ft_send_work(struct work_struct *work)
628 if (ret == -ENOMEM) { 626 if (ret == -ENOMEM) {
629 transport_send_check_condition_and_sense(se_cmd, 627 transport_send_check_condition_and_sense(se_cmd,
630 TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); 628 TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
631 transport_generic_free_cmd(se_cmd, 0, 0); 629 transport_generic_free_cmd(se_cmd, 0);
632 return; 630 return;
633 } 631 }
634 if (ret == -EINVAL) { 632 if (ret == -EINVAL) {
@@ -637,10 +635,10 @@ static void ft_send_work(struct work_struct *work)
637 else 635 else
638 transport_send_check_condition_and_sense(se_cmd, 636 transport_send_check_condition_and_sense(se_cmd,
639 se_cmd->scsi_sense_reason, 0); 637 se_cmd->scsi_sense_reason, 0);
640 transport_generic_free_cmd(se_cmd, 0, 0); 638 transport_generic_free_cmd(se_cmd, 0);
641 return; 639 return;
642 } 640 }
643 transport_generic_handle_cdb(se_cmd); 641 transport_handle_cdb_direct(se_cmd);
644 return; 642 return;
645 643
646err: 644err: