target: remove the always-noop ->new_cmd_failure method
[linux-2.6.git] / drivers / target / loopback / tcm_loop.c
index eeb7ee7..cb4a9b9 100644 (file)
@@ -118,7 +118,7 @@ static struct se_cmd *tcm_loop_allocate_core_cmd(
         * Signal BIDI usage with T_TASK(cmd)->t_tasks_bidi
         */
        if (scsi_bidi_cmnd(sc))
-               se_cmd->t_task.t_tasks_bidi = 1;
+               se_cmd->t_tasks_bidi = 1;
        /*
         * Locate the struct se_lun pointer and attach it to struct se_cmd
         */
@@ -169,7 +169,7 @@ static int tcm_loop_new_cmd_map(struct se_cmd *se_cmd)
         * For BIDI commands, pass in the extra READ buffer
         * to transport_generic_map_mem_to_cmd() below..
         */
-       if (se_cmd->t_task.t_tasks_bidi) {
+       if (se_cmd->t_tasks_bidi) {
                struct scsi_data_buffer *sdb = scsi_in(sc);
 
                sgl_bidi = sdb->table.sgl;
@@ -772,16 +772,6 @@ static u32 tcm_loop_get_inst_index(struct se_portal_group *se_tpg)
        return 1;
 }
 
-static void tcm_loop_new_cmd_failure(struct se_cmd *se_cmd)
-{
-       /*
-        * Since TCM_loop is already passing struct scatterlist data from
-        * struct scsi_cmnd, no more Linux/SCSI failure dependent state need
-        * to be handled here.
-        */
-       return;
-}
-
 static int tcm_loop_is_state_remove(struct se_cmd *se_cmd)
 {
        /*
@@ -1424,13 +1414,6 @@ static int tcm_loop_register_configfs(void)
                                        &tcm_loop_tpg_release_fabric_acl;
        fabric->tf_ops.tpg_get_inst_index = &tcm_loop_get_inst_index;
        /*
-        * Since tcm_loop is mapping physical memory from Linux/SCSI
-        * struct scatterlist arrays for each struct scsi_cmnd I/O,
-        * we do not need TCM to allocate a iovec array for
-        * virtual memory address mappings
-        */
-       fabric->tf_ops.alloc_cmd_iovecs = NULL;
-       /*
         * Used for setting up remaining TCM resources in process context
         */
        fabric->tf_ops.new_cmd_map = &tcm_loop_new_cmd_map;
@@ -1453,7 +1436,6 @@ static int tcm_loop_register_configfs(void)
                                        &tcm_loop_set_default_node_attributes;
        fabric->tf_ops.get_task_tag = &tcm_loop_get_task_tag;
        fabric->tf_ops.get_cmd_state = &tcm_loop_get_cmd_state;
-       fabric->tf_ops.new_cmd_failure = &tcm_loop_new_cmd_failure;
        fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in;
        fabric->tf_ops.queue_status = &tcm_loop_queue_status;
        fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp;