aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-06-18 05:43:37 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2015-07-24 01:08:20 -0400
commitb7446cacfb433f5e89ff94afecbc349e404aee21 (patch)
treebf968ba39f009b7cf2a98724cbb7afa2d986c004
parentfe052a1810ec4687ee7d606290561af504047707 (diff)
tcm_loop: Remove SAS vestigies
tcm_loop is able to emulate several protocols, so remove last vestigies of the SAS protocol. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/loopback/tcm_loop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index a556bdebd775..b179d934cee1 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -526,7 +526,7 @@ static inline struct tcm_loop_tpg *tl_tpg(struct se_portal_group *se_tpg)
526static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg) 526static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg)
527{ 527{
528 /* 528 /*
529 * Return the passed NAA identifier for the SAS Target Port 529 * Return the passed NAA identifier for the Target Port
530 */ 530 */
531 return &tl_tpg(se_tpg)->tl_hba->tl_wwn_address[0]; 531 return &tl_tpg(se_tpg)->tl_hba->tl_wwn_address[0];
532} 532}
@@ -845,7 +845,7 @@ static int tcm_loop_make_nexus(
845 transport_free_session(tl_nexus->se_sess); 845 transport_free_session(tl_nexus->se_sess);
846 goto out; 846 goto out;
847 } 847 }
848 /* Now, register the SAS I_T Nexus as active. */ 848 /* Now, register the I_T Nexus as active. */
849 transport_register_session(se_tpg, tl_nexus->se_sess->se_node_acl, 849 transport_register_session(se_tpg, tl_nexus->se_sess->se_node_acl,
850 tl_nexus->se_sess, tl_nexus); 850 tl_nexus->se_sess, tl_nexus);
851 tl_tpg->tl_nexus = tl_nexus; 851 tl_tpg->tl_nexus = tl_nexus;
@@ -884,7 +884,7 @@ static int tcm_loop_drop_nexus(
884 " %s Initiator Port: %s\n", tcm_loop_dump_proto_id(tpg->tl_hba), 884 " %s Initiator Port: %s\n", tcm_loop_dump_proto_id(tpg->tl_hba),
885 tl_nexus->se_sess->se_node_acl->initiatorname); 885 tl_nexus->se_sess->se_node_acl->initiatorname);
886 /* 886 /*
887 * Release the SCSI I_T Nexus to the emulated SAS Target Port 887 * Release the SCSI I_T Nexus to the emulated Target Port
888 */ 888 */
889 transport_deregister_session(tl_nexus->se_sess); 889 transport_deregister_session(tl_nexus->se_sess);
890 tpg->tl_nexus = NULL; 890 tpg->tl_nexus = NULL;
@@ -1077,7 +1077,7 @@ static struct se_portal_group *tcm_loop_make_naa_tpg(
1077 tl_tpg->tl_hba = tl_hba; 1077 tl_tpg->tl_hba = tl_hba;
1078 tl_tpg->tl_tpgt = tpgt; 1078 tl_tpg->tl_tpgt = tpgt;
1079 /* 1079 /*
1080 * Register the tl_tpg as a emulated SAS TCM Target Endpoint 1080 * Register the tl_tpg as a emulated TCM Target Endpoint
1081 */ 1081 */
1082 ret = core_tpg_register(wwn, &tl_tpg->tl_se_tpg, tl_hba->tl_proto_id); 1082 ret = core_tpg_register(wwn, &tl_tpg->tl_se_tpg, tl_hba->tl_proto_id);
1083 if (ret < 0) 1083 if (ret < 0)
@@ -1102,11 +1102,11 @@ static void tcm_loop_drop_naa_tpg(
1102 tl_hba = tl_tpg->tl_hba; 1102 tl_hba = tl_tpg->tl_hba;
1103 tpgt = tl_tpg->tl_tpgt; 1103 tpgt = tl_tpg->tl_tpgt;
1104 /* 1104 /*
1105 * Release the I_T Nexus for the Virtual SAS link if present 1105 * Release the I_T Nexus for the Virtual target link if present
1106 */ 1106 */
1107 tcm_loop_drop_nexus(tl_tpg); 1107 tcm_loop_drop_nexus(tl_tpg);
1108 /* 1108 /*
1109 * Deregister the tl_tpg as a emulated SAS TCM Target Endpoint 1109 * Deregister the tl_tpg as a emulated TCM Target Endpoint
1110 */ 1110 */
1111 core_tpg_deregister(se_tpg); 1111 core_tpg_deregister(se_tpg);
1112 1112
@@ -1199,8 +1199,9 @@ static void tcm_loop_drop_scsi_hba(
1199 struct tcm_loop_hba, tl_hba_wwn); 1199 struct tcm_loop_hba, tl_hba_wwn);
1200 1200
1201 pr_debug("TCM_Loop_ConfigFS: Deallocating emulated Target" 1201 pr_debug("TCM_Loop_ConfigFS: Deallocating emulated Target"
1202 " SAS Address: %s at Linux/SCSI Host ID: %d\n", 1202 " %s Address: %s at Linux/SCSI Host ID: %d\n",
1203 tl_hba->tl_wwn_address, tl_hba->sh->host_no); 1203 tcm_loop_dump_proto_id(tl_hba), tl_hba->tl_wwn_address,
1204 tl_hba->sh->host_no);
1204 /* 1205 /*
1205 * Call device_unregister() on the original tl_hba->dev. 1206 * Call device_unregister() on the original tl_hba->dev.
1206 * tcm_loop_fabric_scsi.c:tcm_loop_release_adapter() will 1207 * tcm_loop_fabric_scsi.c:tcm_loop_release_adapter() will