]> Pileus Git - ~andy/linux/blobdiff - drivers/target/tcm_fc/tfc_cmd.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[~andy/linux] / drivers / target / tcm_fc / tfc_cmd.c
index 80fbcde00cb694db7a628d3e0c0362a3e47650cd..6195026cc7b02bb908cecd6ed32f9527a3b34399 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/version.h>
 #include <generated/utsrelease.h>
 #include <linux/utsname.h>
 #include <linux/init.h>
@@ -115,7 +114,7 @@ void ft_release_cmd(struct se_cmd *se_cmd)
 
 void ft_check_stop_free(struct se_cmd *se_cmd)
 {
-       transport_generic_free_cmd(se_cmd, 0, 0);
+       transport_generic_free_cmd(se_cmd, 0);
 }
 
 /*
@@ -268,9 +267,8 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg)
 
        if (IS_ERR(fp)) {
                /* XXX need to find cmd if queued */
-               cmd->se_cmd.t_state = TRANSPORT_REMOVE;
                cmd->seq = NULL;
-               transport_generic_free_cmd(&cmd->se_cmd, 0, 0);
+               transport_generic_free_cmd(&cmd->se_cmd, 0);
                return;
        }
 
@@ -288,7 +286,7 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg)
                       __func__, fh->fh_r_ctl);
                ft_invl_hw_context(cmd);
                fc_frame_free(fp);
-               transport_generic_free_cmd(&cmd->se_cmd, 0, 0);
+               transport_generic_free_cmd(&cmd->se_cmd, 0);
                break;
        }
 }
@@ -397,7 +395,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
        }
 
        pr_debug("alloc tm cmd fn %d\n", tm_func);
-       tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func);
+       tmr = core_tmr_alloc_req(&cmd->se_cmd, cmd, tm_func, GFP_KERNEL);
        if (!tmr) {
                pr_debug("alloc failed\n");
                ft_send_resp_code_and_free(cmd, FCP_TMF_FAILED);
@@ -421,7 +419,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
                        sess = cmd->sess;
                        transport_send_check_condition_and_sense(&cmd->se_cmd,
                                cmd->se_cmd.scsi_sense_reason, 0);
-                       transport_generic_free_cmd(&cmd->se_cmd, 0, 0);
+                       transport_generic_free_cmd(&cmd->se_cmd, 0);
                        ft_sess_put(sess);
                        return;
                }
@@ -628,7 +626,7 @@ static void ft_send_work(struct work_struct *work)
        if (ret == -ENOMEM) {
                transport_send_check_condition_and_sense(se_cmd,
                                TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
-               transport_generic_free_cmd(se_cmd, 0, 0);
+               transport_generic_free_cmd(se_cmd, 0);
                return;
        }
        if (ret == -EINVAL) {
@@ -637,10 +635,10 @@ static void ft_send_work(struct work_struct *work)
                else
                        transport_send_check_condition_and_sense(se_cmd,
                                        se_cmd->scsi_sense_reason, 0);
-               transport_generic_free_cmd(se_cmd, 0, 0);
+               transport_generic_free_cmd(se_cmd, 0);
                return;
        }
-       transport_generic_handle_cdb(se_cmd);
+       transport_handle_cdb_direct(se_cmd);
        return;
 
 err: