]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
target: remove the get_fabric_proto_ident method
authorChristoph Hellwig <hch@lst.de>
Fri, 1 May 2015 15:47:57 +0000 (17:47 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 31 May 2015 05:42:30 +0000 (22:42 -0700)
Now that we store the protocol identifier in the tpg structure we don't
need this method.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
15 files changed:
Documentation/target/tcm_mod_builder.py
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/target/iscsi/iscsi_target_configfs.c
drivers/target/loopback/tcm_loop.c
drivers/target/sbp/sbp_target.c
drivers/target/target_core_configfs.c
drivers/target/target_core_fabric_lib.c
drivers/target/target_core_pr.c
drivers/target/target_core_spc.c
drivers/target/tcm_fc/tfc_conf.c
drivers/usb/gadget/legacy/tcm_usb_gadget.c
drivers/vhost/scsi.c
drivers/xen/xen-scsiback.c
include/target/target_core_fabric.h

index b04846e985d4f5ca08025a5f79636cd2b3137ba1..29176c29537cdafc6eb9696d927798d534a8bd39 100755 (executable)
@@ -300,9 +300,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
        buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n"
        buf += "        .module                         = THIS_MODULE,\n"
        buf += "        .name                           = " + fabric_mod_name + ",\n"
-       buf += "        .get_fabric_proto_ident         = " + fabric_mod_name + "_get_fabric_proto_ident,\n"
        buf += "        .get_fabric_name                = " + fabric_mod_name + "_get_fabric_name,\n"
-       buf += "        .get_fabric_proto_ident         = " + fabric_mod_name + "_get_fabric_proto_ident,\n"
        buf += "        .tpg_get_wwn                    = " + fabric_mod_name + "_get_fabric_wwn,\n"
        buf += "        .tpg_get_tag                    = " + fabric_mod_name + "_get_tag,\n"
        buf += "        .tpg_get_pr_transport_id        = " + fabric_mod_name + "_get_pr_transport_id,\n"
@@ -461,35 +459,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
                        bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n"
                        continue
 
-               if re.search('get_fabric_proto_ident', fo):
-                       buf += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *se_tpg)\n"
-                       buf += "{\n"
-                       buf += "        struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
-                       buf += "                                struct " + fabric_mod_name + "_tpg, se_tpg);\n"
-                       buf += "        struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
-                       buf += "        u8 proto_id;\n\n"
-                       buf += "        switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
-                       if proto_ident == "FC":
-                               buf += "        case SCSI_PROTOCOL_FCP:\n"
-                               buf += "        default:\n"
-                               buf += "                proto_id = fc_get_fabric_proto_ident(se_tpg);\n"
-                               buf += "                break;\n"
-                       elif proto_ident == "SAS":
-                               buf += "        case SCSI_PROTOCOL_SAS:\n"
-                               buf += "        default:\n"
-                               buf += "                proto_id = sas_get_fabric_proto_ident(se_tpg);\n"
-                               buf += "                break;\n"
-                       elif proto_ident == "iSCSI":
-                               buf += "        case SCSI_PROTOCOL_ISCSI:\n"
-                               buf += "        default:\n"
-                               buf += "                proto_id = iscsi_get_fabric_proto_ident(se_tpg);\n"
-                               buf += "                break;\n"
-
-                       buf += "        }\n\n"
-                       buf += "        return proto_id;\n"
-                       buf += "}\n\n"
-                       bufi += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *);\n"
-
                if re.search('get_wwn', fo):
                        buf += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *se_tpg)\n"
                        buf += "{\n"
index 8eed6089c5d7e69a223739806e0656d9c35275a6..9213c2de28fc34c4af539186022478fd64356594 100644 (file)
@@ -3394,11 +3394,6 @@ static char *srpt_get_fabric_name(void)
        return "srpt";
 }
 
-static u8 srpt_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       return SCSI_TRANSPORTID_PROTOCOLID_SRP;
-}
-
 static char *srpt_get_fabric_wwn(struct se_portal_group *tpg)
 {
        struct srpt_port *sport = container_of(tpg, struct srpt_port, port_tpg_1);
@@ -3863,7 +3858,6 @@ static const struct target_core_fabric_ops srpt_template = {
        .name                           = "srpt",
        .node_acl_size                  = sizeof(struct srpt_node_acl),
        .get_fabric_name                = srpt_get_fabric_name,
-       .get_fabric_proto_ident         = srpt_get_fabric_proto_ident,
        .tpg_get_wwn                    = srpt_get_fabric_wwn,
        .tpg_get_tag                    = srpt_get_tag,
        .tpg_get_pr_transport_id        = srpt_get_pr_transport_id,
index 30cbfa6dc3e6a3bdef385ddf0fe1ffaeab3be6dd..4566c4649751b3c136889d736b876479ca3d2171 100644 (file)
@@ -190,23 +190,6 @@ static char *tcm_qla2xxx_npiv_get_fabric_name(void)
        return "qla2xxx_npiv";
 }
 
-static u8 tcm_qla2xxx_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,
-                               struct tcm_qla2xxx_tpg, se_tpg);
-       struct tcm_qla2xxx_lport *lport = tpg->lport;
-       u8 proto_id;
-
-       switch (lport->lport_proto_id) {
-       case SCSI_PROTOCOL_FCP:
-       default:
-               proto_id = fc_get_fabric_proto_ident(se_tpg);
-               break;
-       }
-
-       return proto_id;
-}
-
 static char *tcm_qla2xxx_get_fabric_wwn(struct se_portal_group *se_tpg)
 {
        struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,
@@ -1928,7 +1911,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_ops = {
        .name                           = "qla2xxx",
        .node_acl_size                  = sizeof(struct tcm_qla2xxx_nacl),
        .get_fabric_name                = tcm_qla2xxx_get_fabric_name,
-       .get_fabric_proto_ident         = tcm_qla2xxx_get_fabric_proto_ident,
        .tpg_get_wwn                    = tcm_qla2xxx_get_fabric_wwn,
        .tpg_get_tag                    = tcm_qla2xxx_get_tag,
        .tpg_get_pr_transport_id        = tcm_qla2xxx_get_pr_transport_id,
@@ -1979,7 +1961,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
        .name                           = "qla2xxx_npiv",
        .node_acl_size                  = sizeof(struct tcm_qla2xxx_nacl),
        .get_fabric_name                = tcm_qla2xxx_npiv_get_fabric_name,
-       .get_fabric_proto_ident         = tcm_qla2xxx_get_fabric_proto_ident,
        .tpg_get_wwn                    = tcm_qla2xxx_get_fabric_wwn,
        .tpg_get_tag                    = tcm_qla2xxx_get_tag,
        .tpg_get_pr_transport_id        = tcm_qla2xxx_get_pr_transport_id,
index 0d5d88817a478b41e1bbed750c9602383991d13c..9dec9f39139fdc8210620d8a73b1dcab04f0a5f3 100644 (file)
@@ -1918,7 +1918,6 @@ const struct target_core_fabric_ops iscsi_ops = {
        .name                           = "iscsi",
        .node_acl_size                  = sizeof(struct iscsi_node_acl),
        .get_fabric_name                = iscsi_get_fabric_name,
-       .get_fabric_proto_ident         = iscsi_get_fabric_proto_ident,
        .tpg_get_wwn                    = lio_tpg_get_endpoint_wwn,
        .tpg_get_tag                    = lio_tpg_get_tag,
        .tpg_get_default_depth          = lio_tpg_get_default_depth,
index 3f264d436737df066abedb20b5b696f6cb13b42b..0eed0209a7f4b79cbdd38547791ec02f3f68ad4d 100644 (file)
@@ -525,32 +525,6 @@ static inline struct tcm_loop_tpg *tl_tpg(struct se_portal_group *se_tpg)
        return container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg);
 }
 
-static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       struct tcm_loop_hba *tl_hba = tl_tpg(se_tpg)->tl_hba;
-       /*
-        * tl_proto_id is set at tcm_loop_configfs.c:tcm_loop_make_scsi_hba()
-        * time based on the protocol dependent prefix of the passed configfs group.
-        *
-        * Based upon tl_proto_id, TCM_Loop emulates the requested fabric
-        * ProtocolID using target_core_fabric_lib.c symbols.
-        */
-       switch (tl_hba->tl_proto_id) {
-       case SCSI_PROTOCOL_SAS:
-               return sas_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_FCP:
-               return fc_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_ISCSI:
-               return iscsi_get_fabric_proto_ident(se_tpg);
-       default:
-               pr_err("Unknown tl_proto_id: 0x%02x, using"
-                       " SAS emulation\n", tl_hba->tl_proto_id);
-               break;
-       }
-
-       return sas_get_fabric_proto_ident(se_tpg);
-}
-
 static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg)
 {
        /*
@@ -1356,7 +1330,6 @@ static const struct target_core_fabric_ops loop_ops = {
        .module                         = THIS_MODULE,
        .name                           = "loopback",
        .get_fabric_name                = tcm_loop_get_fabric_name,
-       .get_fabric_proto_ident         = tcm_loop_get_fabric_proto_ident,
        .tpg_get_wwn                    = tcm_loop_get_endpoint_wwn,
        .tpg_get_tag                    = tcm_loop_get_tag,
        .tpg_get_pr_transport_id        = tcm_loop_get_pr_transport_id,
index 40b9f516cf9b16de76ae44665e81d63c14107c7e..8acb37fd9ebcb12b5aa85578e4032cdfec71592e 100644 (file)
@@ -1832,18 +1832,6 @@ static int sbp_check_stop_free(struct se_cmd *se_cmd)
        return 1;
 }
 
-/*
- * Handlers for Serial Bus Protocol 2/3 (SBP-2 / SBP-3)
- */
-static u8 sbp_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       /*
-        * Return a IEEE 1394 SCSI Protocol identifier for loopback operations
-        * This is defined in section 7.5.1 Table 362 in spc4r17
-        */
-       return SCSI_PROTOCOL_SBP;
-}
-
 static u32 sbp_get_pr_transport_id(
        struct se_portal_group *se_tpg,
        struct se_node_acl *se_nacl,
@@ -2442,7 +2430,6 @@ static const struct target_core_fabric_ops sbp_ops = {
        .module                         = THIS_MODULE,
        .name                           = "sbp",
        .get_fabric_name                = sbp_get_fabric_name,
-       .get_fabric_proto_ident         = sbp_get_fabric_proto_ident,
        .tpg_get_wwn                    = sbp_get_fabric_wwn,
        .tpg_get_tag                    = sbp_get_tag,
        .tpg_get_pr_transport_id        = sbp_get_pr_transport_id,
index 2b10499264d3fce391c722d7eefe251b0383c3b8..21c9f7d79d5ea9d9b4d548f7c31b10525c1ddcff 100644 (file)
@@ -318,10 +318,6 @@ static int target_fabric_tf_ops_check(const struct target_core_fabric_ops *tfo)
                pr_err("Missing tfo->get_fabric_name()\n");
                return -EINVAL;
        }
-       if (!tfo->get_fabric_proto_ident) {
-               pr_err("Missing tfo->get_fabric_proto_ident()\n");
-               return -EINVAL;
-       }
        if (!tfo->tpg_get_wwn) {
                pr_err("Missing tfo->tpg_get_wwn()\n");
                return -EINVAL;
index 35bfe77160d86828b6511034787862f74788addc..6fed14adbe618b2f7b0967aea462b881d945655e 100644 (file)
 /*
  * Handlers for Serial Attached SCSI (SAS)
  */
-u8 sas_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       /*
-        * Return a SAS Serial SCSI Protocol identifier for loopback operations
-        * This is defined in  section 7.5.1 Table 362 in spc4r17
-        */
-       return 0x6;
-}
-EXPORT_SYMBOL(sas_get_fabric_proto_ident);
-
 u32 sas_get_pr_transport_id(
        struct se_portal_group *se_tpg,
        struct se_node_acl *se_nacl,
@@ -128,12 +118,6 @@ EXPORT_SYMBOL(sas_parse_pr_out_transport_id);
 /*
  * Handlers for Fibre Channel Protocol (FCP)
  */
-u8 fc_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       return 0x0;     /* 0 = fcp-2 per SPC4 section 7.5.1 */
-}
-EXPORT_SYMBOL(fc_get_fabric_proto_ident);
-
 u32 fc_get_pr_transport_id_len(
        struct se_portal_group *se_tpg,
        struct se_node_acl *se_nacl,
@@ -208,17 +192,6 @@ EXPORT_SYMBOL(fc_parse_pr_out_transport_id);
 /*
  * Handlers for Internet Small Computer Systems Interface (iSCSI)
  */
-
-u8 iscsi_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       /*
-        * This value is defined for "Internet SCSI (iSCSI)"
-        * in spc4r17 section 7.5.1 Table 362
-        */
-       return 0x5;
-}
-EXPORT_SYMBOL(iscsi_get_fabric_proto_ident);
-
 u32 iscsi_get_pr_transport_id(
        struct se_portal_group *se_tpg,
        struct se_node_acl *se_nacl,
index a15411c79ae99649041c216439e938f52a7c071a..23c065f83a561482c21088165c66317ce56637f1 100644 (file)
@@ -1447,7 +1447,7 @@ core_scsi3_decode_spec_i_port(
        struct pr_transport_id_holder *tidh_new, *tidh, *tidh_tmp;
        const struct target_core_fabric_ops *tmp_tf_ops;
        unsigned char *buf;
-       unsigned char *ptr, *i_str = NULL, proto_ident, tmp_proto_ident;
+       unsigned char *ptr, *i_str = NULL, proto_ident;
        char *iport_ptr = NULL, i_buf[PR_REG_ISID_ID_LEN];
        sense_reason_t ret;
        u32 tpdl, tid_len = 0;
@@ -1536,15 +1536,13 @@ core_scsi3_decode_spec_i_port(
                        tmp_tf_ops = tmp_tpg->se_tpg_tfo;
                        if (!tmp_tf_ops)
                                continue;
-                       if (!tmp_tf_ops->get_fabric_proto_ident ||
-                           !tmp_tf_ops->tpg_parse_pr_out_transport_id)
+                       if (!tmp_tf_ops->tpg_parse_pr_out_transport_id)
                                continue;
                        /*
                         * Look for the matching proto_ident provided by
                         * the received TransportID
                         */
-                       tmp_proto_ident = tmp_tf_ops->get_fabric_proto_ident(tmp_tpg);
-                       if (tmp_proto_ident != proto_ident)
+                       if (tmp_tpg->proto_id != proto_ident)
                                continue;
                        dest_rtpi = tmp_port->sep_rtpi;
 
@@ -3230,11 +3228,11 @@ core_scsi3_emulate_pro_register_and_move(struct se_cmd *cmd, u64 res_key,
        pr_debug("SPC-3 PR REGISTER_AND_MOVE: Extracted Protocol Identifier:"
                        " 0x%02x\n", proto_ident);
 
-       if (proto_ident != dest_tf_ops->get_fabric_proto_ident(dest_se_tpg)) {
+       if (proto_ident != dest_se_tpg->proto_id) {
                pr_err("SPC-3 PR REGISTER_AND_MOVE: Received"
                        " proto_ident: 0x%02x does not match ident: 0x%02x"
                        " from fabric: %s\n", proto_ident,
-                       dest_tf_ops->get_fabric_proto_ident(dest_se_tpg),
+                       dest_se_tpg->proto_id,
                        dest_tf_ops->get_fabric_name());
                ret = TCM_INVALID_PARAMETER_LIST;
                goto out;
index 988c158cf65d149e787de81caf02ff829a8c3167..78c0b40fa5c00f243a5d49dc12206b2de18d1a20 100644 (file)
@@ -286,8 +286,7 @@ check_t10_vend_desc:
                 * Get the PROTOCOL IDENTIFIER as defined by spc4r17
                 * section 7.5.1 Table 362
                 */
-               buf[off] =
-                       (tpg->se_tpg_tfo->get_fabric_proto_ident(tpg) << 4);
+               buf[off] = tpg->proto_id << 4;
                buf[off++] |= 0x1; /* CODE SET == Binary */
                buf[off] = 0x80; /* Set PIV=1 */
                /* Set ASSOCIATION == target port: 01b */
@@ -322,8 +321,7 @@ check_t10_vend_desc:
                tg_pt_gp_id = tg_pt_gp->tg_pt_gp_id;
                spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock);
 
-               buf[off] =
-                       (tpg->se_tpg_tfo->get_fabric_proto_ident(tpg) << 4);
+               buf[off] = tpg->proto_id << 4;
                buf[off++] |= 0x1; /* CODE SET == Binary */
                buf[off] = 0x80; /* Set PIV=1 */
                /* Set ASSOCIATION == target port: 01b */
@@ -371,8 +369,7 @@ check_lu_gp:
                 * section 7.5.1 Table 362
                 */
 check_scsi_name:
-               buf[off] =
-                       (tpg->se_tpg_tfo->get_fabric_proto_ident(tpg) << 4);
+               buf[off] = tpg->proto_id << 4;
                buf[off++] |= 0x3; /* CODE SET == UTF-8 */
                buf[off] = 0x80; /* Set PIV=1 */
                /* Set ASSOCIATION == target port: 01b */
@@ -412,8 +409,7 @@ check_scsi_name:
                /*
                 * Target device designator
                 */
-               buf[off] =
-                       (tpg->se_tpg_tfo->get_fabric_proto_ident(tpg) << 4);
+               buf[off] = tpg->proto_id << 4;
                buf[off++] |= 0x3; /* CODE SET == UTF-8 */
                buf[off] = 0x80; /* Set PIV=1 */
                /* Set ASSOCIATION == target device: 10b */
index 8309c3d91387f8494fb0e580de39d3c8930f6bfe..fabc7bacf693e1ebae97153f2a849c2dd84989e0 100644 (file)
@@ -452,7 +452,6 @@ static const struct target_core_fabric_ops ft_fabric_ops = {
        .name =                         "fc",
        .node_acl_size =                sizeof(struct ft_node_acl),
        .get_fabric_name =              ft_get_fabric_name,
-       .get_fabric_proto_ident =       fc_get_fabric_proto_ident,
        .tpg_get_wwn =                  ft_get_fabric_wwn,
        .tpg_get_tag =                  ft_get_tag,
        .tpg_get_pr_transport_id =      fc_get_pr_transport_id,
index 08b4f48aa49e40e04065c6dcd7b8865dc364c3cd..d6b03178262f891806266a8efe427b3fa546d4cc 100644 (file)
@@ -1274,23 +1274,6 @@ static char *usbg_get_fabric_name(void)
        return "usb_gadget";
 }
 
-static u8 usbg_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       struct usbg_tpg *tpg = container_of(se_tpg,
-                               struct usbg_tpg, se_tpg);
-       struct usbg_tport *tport = tpg->tport;
-       u8 proto_id;
-
-       switch (tport->tport_proto_id) {
-       case SCSI_PROTOCOL_SAS:
-       default:
-               proto_id = sas_get_fabric_proto_ident(se_tpg);
-               break;
-       }
-
-       return proto_id;
-}
-
 static char *usbg_get_fabric_wwn(struct se_portal_group *se_tpg)
 {
        struct usbg_tpg *tpg = container_of(se_tpg,
@@ -1803,7 +1786,6 @@ static const struct target_core_fabric_ops usbg_ops = {
        .module                         = THIS_MODULE,
        .name                           = "usb_gadget",
        .get_fabric_name                = usbg_get_fabric_name,
-       .get_fabric_proto_ident         = usbg_get_fabric_proto_ident,
        .tpg_get_wwn                    = usbg_get_fabric_wwn,
        .tpg_get_tag                    = usbg_get_tag,
        .tpg_get_pr_transport_id        = usbg_get_pr_transport_id,
index 8295e7be0fcba9af4a9fdd8eecedaa08f3c2c6d3..022860ccd00857e6c9f3c6eb4ce1361f127b453d 100644 (file)
@@ -288,28 +288,6 @@ static char *vhost_scsi_get_fabric_name(void)
        return "vhost";
 }
 
-static u8 vhost_scsi_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       struct vhost_scsi_tpg *tpg = container_of(se_tpg,
-                               struct vhost_scsi_tpg, se_tpg);
-       struct vhost_scsi_tport *tport = tpg->tport;
-
-       switch (tport->tport_proto_id) {
-       case SCSI_PROTOCOL_SAS:
-               return sas_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_FCP:
-               return fc_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_ISCSI:
-               return iscsi_get_fabric_proto_ident(se_tpg);
-       default:
-               pr_err("Unknown tport_proto_id: 0x%02x, using"
-                       " SAS emulation\n", tport->tport_proto_id);
-               break;
-       }
-
-       return sas_get_fabric_proto_ident(se_tpg);
-}
-
 static char *vhost_scsi_get_fabric_wwn(struct se_portal_group *se_tpg)
 {
        struct vhost_scsi_tpg *tpg = container_of(se_tpg,
@@ -2244,7 +2222,6 @@ static struct target_core_fabric_ops vhost_scsi_ops = {
        .module                         = THIS_MODULE,
        .name                           = "vhost",
        .get_fabric_name                = vhost_scsi_get_fabric_name,
-       .get_fabric_proto_ident         = vhost_scsi_get_fabric_proto_ident,
        .tpg_get_wwn                    = vhost_scsi_get_fabric_wwn,
        .tpg_get_tag                    = vhost_scsi_get_tpgt,
        .tpg_get_pr_transport_id        = vhost_scsi_get_pr_transport_id,
index 223d493878eb64a2455de42a4f89ea6edf170b22..8bf9448bd7fd2817a6fe7ab53e6189e596c03c09 100644 (file)
@@ -1254,28 +1254,6 @@ static char *scsiback_dump_proto_id(struct scsiback_tport *tport)
        return "Unknown";
 }
 
-static u8 scsiback_get_fabric_proto_ident(struct se_portal_group *se_tpg)
-{
-       struct scsiback_tpg *tpg = container_of(se_tpg,
-                               struct scsiback_tpg, se_tpg);
-       struct scsiback_tport *tport = tpg->tport;
-
-       switch (tport->tport_proto_id) {
-       case SCSI_PROTOCOL_SAS:
-               return sas_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_FCP:
-               return fc_get_fabric_proto_ident(se_tpg);
-       case SCSI_PROTOCOL_ISCSI:
-               return iscsi_get_fabric_proto_ident(se_tpg);
-       default:
-               pr_err("Unknown tport_proto_id: 0x%02x, using SAS emulation\n",
-                       tport->tport_proto_id);
-               break;
-       }
-
-       return sas_get_fabric_proto_ident(se_tpg);
-}
-
 static char *scsiback_get_fabric_wwn(struct se_portal_group *se_tpg)
 {
        struct scsiback_tpg *tpg = container_of(se_tpg,
@@ -1929,7 +1907,6 @@ static const struct target_core_fabric_ops scsiback_ops = {
        .module                         = THIS_MODULE,
        .name                           = "xen-pvscsi",
        .get_fabric_name                = scsiback_get_fabric_name,
-       .get_fabric_proto_ident         = scsiback_get_fabric_proto_ident,
        .tpg_get_wwn                    = scsiback_get_fabric_wwn,
        .tpg_get_tag                    = scsiback_get_tag,
        .tpg_get_pr_transport_id        = scsiback_get_pr_transport_id,
index e0adc141de078d093f5d2479e6375d582f026a29..495606382546b39b1d26bb51ae7f2dbea0d2aa36 100644 (file)
@@ -6,7 +6,6 @@ struct target_core_fabric_ops {
        const char *name;
        size_t node_acl_size;
        char *(*get_fabric_name)(void);
-       u8 (*get_fabric_proto_ident)(struct se_portal_group *);
        char *(*tpg_get_wwn)(struct se_portal_group *);
        u16 (*tpg_get_tag)(struct se_portal_group *);
        u32 (*tpg_get_default_depth)(struct se_portal_group *);
@@ -179,7 +178,6 @@ int core_tpg_register(const struct target_core_fabric_ops *,
 int    core_tpg_deregister(struct se_portal_group *);
 
 /* SAS helpers */
-u8     sas_get_fabric_proto_ident(struct se_portal_group *);
 u32    sas_get_pr_transport_id(struct se_portal_group *, struct se_node_acl *,
                struct t10_pr_registration *, int *, unsigned char *);
 u32    sas_get_pr_transport_id_len(struct se_portal_group *, struct se_node_acl *,
@@ -188,7 +186,6 @@ char        *sas_parse_pr_out_transport_id(struct se_portal_group *, const char *,
                u32 *, char **);
 
 /* FC helpers */
-u8     fc_get_fabric_proto_ident(struct se_portal_group *);
 u32    fc_get_pr_transport_id(struct se_portal_group *, struct se_node_acl *,
                struct t10_pr_registration *, int *, unsigned char *);
 u32    fc_get_pr_transport_id_len(struct se_portal_group *, struct se_node_acl *,
@@ -197,7 +194,6 @@ char        *fc_parse_pr_out_transport_id(struct se_portal_group *, const char *,
                u32 *, char **);
 
 /* iSCSI helpers */
-u8     iscsi_get_fabric_proto_ident(struct se_portal_group *);
 u32    iscsi_get_pr_transport_id(struct se_portal_group *, struct se_node_acl *,
                struct t10_pr_registration *, int *, unsigned char *);
 u32    iscsi_get_pr_transport_id_len(struct se_portal_group *, struct se_node_acl *,