Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[deliverable/linux.git] / drivers / target / target_core_xcopy.c
index 5ec0d00edaa3412591eebd4fae6a0bd435005a1a..4515f52546f83c5cd0d4ade575f3a006d9ce3683 100644 (file)
@@ -31,7 +31,6 @@
 #include <target/target_core_base.h>
 #include <target/target_core_backend.h>
 #include <target/target_core_fabric.h>
-#include <target/target_core_configfs.h>
 
 #include "target_core_internal.h"
 #include "target_core_pr.h"
@@ -348,8 +347,7 @@ struct xcopy_pt_cmd {
        unsigned char sense_buffer[TRANSPORT_SENSE_BUFFER];
 };
 
-static struct se_port xcopy_pt_port;
-static struct se_portal_group xcopy_pt_tpg;
+struct se_portal_group xcopy_pt_tpg;
 static struct se_session xcopy_pt_sess;
 static struct se_node_acl xcopy_pt_nacl;
 
@@ -358,11 +356,6 @@ static char *xcopy_pt_get_fabric_name(void)
         return "xcopy-pt";
 }
 
-static u32 xcopy_pt_get_tag(struct se_cmd *se_cmd)
-{
-        return 0;
-}
-
 static int xcopy_pt_get_cmd_state(struct se_cmd *se_cmd)
 {
         return 0;
@@ -423,7 +416,6 @@ static int xcopy_pt_queue_status(struct se_cmd *se_cmd)
 
 static const struct target_core_fabric_ops xcopy_pt_tfo = {
        .get_fabric_name        = xcopy_pt_get_fabric_name,
-       .get_task_tag           = xcopy_pt_get_tag,
        .get_cmd_state          = xcopy_pt_get_cmd_state,
        .release_cmd            = xcopy_pt_release_cmd,
        .check_stop_free        = xcopy_pt_check_stop_free,
@@ -445,17 +437,11 @@ int target_xcopy_setup_pt(void)
                return -ENOMEM;
        }
 
-       memset(&xcopy_pt_port, 0, sizeof(struct se_port));
-       INIT_LIST_HEAD(&xcopy_pt_port.sep_alua_list);
-       INIT_LIST_HEAD(&xcopy_pt_port.sep_list);
-       mutex_init(&xcopy_pt_port.sep_tg_pt_md_mutex);
-
        memset(&xcopy_pt_tpg, 0, sizeof(struct se_portal_group));
        INIT_LIST_HEAD(&xcopy_pt_tpg.se_tpg_node);
        INIT_LIST_HEAD(&xcopy_pt_tpg.acl_node_list);
        INIT_LIST_HEAD(&xcopy_pt_tpg.tpg_sess_list);
 
-       xcopy_pt_port.sep_tpg = &xcopy_pt_tpg;
        xcopy_pt_tpg.se_tpg_tfo = &xcopy_pt_tfo;
 
        memset(&xcopy_pt_nacl, 0, sizeof(struct se_node_acl));
@@ -496,10 +482,6 @@ static void target_xcopy_setup_pt_port(
                 */
                if (remote_port) {
                        xpt_cmd->remote_port = remote_port;
-                       pt_cmd->se_lun->lun_sep = &xcopy_pt_port;
-                       pr_debug("Setup emulated remote DEST xcopy_pt_port: %p to"
-                               " cmd->se_lun->lun_sep for X-COPY data PUSH\n",
-                               pt_cmd->se_lun->lun_sep);
                } else {
                        pt_cmd->se_lun = ec_cmd->se_lun;
                        pt_cmd->se_dev = ec_cmd->se_dev;
@@ -519,10 +501,6 @@ static void target_xcopy_setup_pt_port(
                 */
                if (remote_port) {
                        xpt_cmd->remote_port = remote_port;
-                       pt_cmd->se_lun->lun_sep = &xcopy_pt_port;
-                       pr_debug("Setup emulated remote SRC xcopy_pt_port: %p to"
-                               " cmd->se_lun->lun_sep for X-COPY data PULL\n",
-                               pt_cmd->se_lun->lun_sep);
                } else {
                        pt_cmd->se_lun = ec_cmd->se_lun;
                        pt_cmd->se_dev = ec_cmd->se_dev;
@@ -574,6 +552,7 @@ static int target_xcopy_setup_pt_cmd(
        xpt_cmd->xcopy_op = xop;
        target_xcopy_setup_pt_port(xpt_cmd, xop, remote_port);
 
+       cmd->tag = 0;
        sense_rc = target_setup_cmd_from_cdb(cmd, cdb);
        if (sense_rc) {
                ret = -EINVAL;
This page took 0.026787 seconds and 5 git commands to generate.