Lines Matching refs:tpg

164 	struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,  in tcm_qla2xxx_get_fabric_wwn()  local
166 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_get_fabric_wwn()
173 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_get_tag() local
175 return tpg->lport_tpgt; in tcm_qla2xxx_get_tag()
180 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_demo_mode() local
183 return tpg->tpg_attrib.generate_node_acls; in tcm_qla2xxx_check_demo_mode()
188 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_demo_mode_cache() local
191 return tpg->tpg_attrib.cache_dynamic_acls; in tcm_qla2xxx_check_demo_mode_cache()
196 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_demo_write_protect() local
199 return tpg->tpg_attrib.demo_mode_write_protect; in tcm_qla2xxx_check_demo_write_protect()
204 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_prod_write_protect() local
207 return tpg->tpg_attrib.prod_mode_write_protect; in tcm_qla2xxx_check_prod_write_protect()
212 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_demo_mode_login_only() local
215 return tpg->tpg_attrib.demo_mode_login_only; in tcm_qla2xxx_check_demo_mode_login_only()
220 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_check_prot_fabric_only() local
223 return tpg->tpg_attrib.fabric_prot_type; in tcm_qla2xxx_check_prot_fabric_only()
228 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_tpg_get_inst_index() local
231 return tpg->lport_tpgt; in tcm_qla2xxx_tpg_get_inst_index()
452 struct tcm_qla2xxx_tpg *tpg; in tcm_qla2xxx_handle_cmd() local
477 tpg = container_of(se_tpg, struct tcm_qla2xxx_tpg, se_tpg); in tcm_qla2xxx_handle_cmd()
478 if (unlikely(tpg->tpg_attrib.jam_host)) { in tcm_qla2xxx_handle_cmd()
861 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \
864 return sprintf(page, "%d\n", tpg->tpg_attrib.name); \
871 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \
873 struct tcm_qla2xxx_tpg_attrib *a = &tpg->tpg_attrib; \
925 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_enable_tpg() local
929 if (atomic_read(&tpg->lport_tpg_enabled)) in tcm_qla2xxx_enable_tpg()
932 atomic_set(&tpg->lport_tpg_enabled, 1); in tcm_qla2xxx_enable_tpg()
935 if (!atomic_read(&tpg->lport_tpg_enabled)) in tcm_qla2xxx_enable_tpg()
938 atomic_set(&tpg->lport_tpg_enabled, 0); in tcm_qla2xxx_enable_tpg()
956 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_tpg_fabric_prot_type_store() local
969 tpg->tpg_attrib.fabric_prot_type = val; in tcm_qla2xxx_tpg_fabric_prot_type_store()
978 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_tpg_fabric_prot_type_show() local
981 return sprintf(page, "%d\n", tpg->tpg_attrib.fabric_prot_type); in tcm_qla2xxx_tpg_fabric_prot_type_show()
998 struct tcm_qla2xxx_tpg *tpg; in tcm_qla2xxx_make_tpg() local
1012 tpg = kzalloc(sizeof(struct tcm_qla2xxx_tpg), GFP_KERNEL); in tcm_qla2xxx_make_tpg()
1013 if (!tpg) { in tcm_qla2xxx_make_tpg()
1017 tpg->lport = lport; in tcm_qla2xxx_make_tpg()
1018 tpg->lport_tpgt = tpgt; in tcm_qla2xxx_make_tpg()
1023 tpg->tpg_attrib.generate_node_acls = 1; in tcm_qla2xxx_make_tpg()
1024 tpg->tpg_attrib.demo_mode_write_protect = 1; in tcm_qla2xxx_make_tpg()
1025 tpg->tpg_attrib.cache_dynamic_acls = 1; in tcm_qla2xxx_make_tpg()
1026 tpg->tpg_attrib.demo_mode_login_only = 1; in tcm_qla2xxx_make_tpg()
1027 tpg->tpg_attrib.jam_host = 0; in tcm_qla2xxx_make_tpg()
1029 ret = core_tpg_register(wwn, &tpg->se_tpg, SCSI_PROTOCOL_FCP); in tcm_qla2xxx_make_tpg()
1031 kfree(tpg); in tcm_qla2xxx_make_tpg()
1035 lport->tpg_1 = tpg; in tcm_qla2xxx_make_tpg()
1037 return &tpg->se_tpg; in tcm_qla2xxx_make_tpg()
1042 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_drop_tpg() local
1044 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_drop_tpg()
1058 kfree(tpg); in tcm_qla2xxx_drop_tpg()
1068 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_npiv_enable_tpg() local
1072 if (atomic_read(&tpg->lport_tpg_enabled)) in tcm_qla2xxx_npiv_enable_tpg()
1075 atomic_set(&tpg->lport_tpg_enabled, 1); in tcm_qla2xxx_npiv_enable_tpg()
1078 if (!atomic_read(&tpg->lport_tpg_enabled)) in tcm_qla2xxx_npiv_enable_tpg()
1081 atomic_set(&tpg->lport_tpg_enabled, 0); in tcm_qla2xxx_npiv_enable_tpg()
1094 struct tcm_qla2xxx_tpg *tpg; in tcm_qla2xxx_npiv_make_tpg() local
1103 tpg = kzalloc(sizeof(struct tcm_qla2xxx_tpg), GFP_KERNEL); in tcm_qla2xxx_npiv_make_tpg()
1104 if (!tpg) { in tcm_qla2xxx_npiv_make_tpg()
1108 tpg->lport = lport; in tcm_qla2xxx_npiv_make_tpg()
1109 tpg->lport_tpgt = tpgt; in tcm_qla2xxx_npiv_make_tpg()
1115 tpg->tpg_attrib.generate_node_acls = 1; in tcm_qla2xxx_npiv_make_tpg()
1116 tpg->tpg_attrib.demo_mode_write_protect = 1; in tcm_qla2xxx_npiv_make_tpg()
1117 tpg->tpg_attrib.cache_dynamic_acls = 1; in tcm_qla2xxx_npiv_make_tpg()
1118 tpg->tpg_attrib.demo_mode_login_only = 1; in tcm_qla2xxx_npiv_make_tpg()
1120 ret = core_tpg_register(wwn, &tpg->se_tpg, SCSI_PROTOCOL_FCP); in tcm_qla2xxx_npiv_make_tpg()
1122 kfree(tpg); in tcm_qla2xxx_npiv_make_tpg()
1125 lport->tpg_1 = tpg; in tcm_qla2xxx_npiv_make_tpg()
1126 return &tpg->se_tpg; in tcm_qla2xxx_npiv_make_tpg()
1379 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, in tcm_qla2xxx_session_cb() local
1381 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_session_cb()
1415 struct tcm_qla2xxx_tpg *tpg; in tcm_qla2xxx_check_initiator_node_acl() local
1430 tpg = lport->tpg_1; in tcm_qla2xxx_check_initiator_node_acl()
1431 if (!tpg) { in tcm_qla2xxx_check_initiator_node_acl()
1445 se_sess = target_setup_session(&tpg->se_tpg, num_tags, in tcm_qla2xxx_check_initiator_node_acl()