Lines Matching defs:tpg

82 	struct efct_lio_tpg *tpg =
83 container_of(se_tpg, struct efct_lio_tpg, tpg);
85 return snprintf(page, PAGE_SIZE, "%d\n", tpg->enabled);
93 struct efct_lio_tpg *tpg =
94 container_of(se_tpg, struct efct_lio_tpg, tpg);
99 if (!tpg->nport || !tpg->nport->efct) {
104 efct = tpg->nport->efct;
113 tpg->enabled = true;
114 efc_log_debug(efct, "enable portal group %d\n", tpg->tpgt);
123 efc_log_debug(efct, "disable portal group %d\n", tpg->tpgt);
128 tpg->enabled = false;
140 struct efct_lio_tpg *tpg =
141 container_of(se_tpg, struct efct_lio_tpg, tpg);
143 return snprintf(page, PAGE_SIZE, "%d\n", tpg->enabled);
151 struct efct_lio_tpg *tpg =
152 container_of(se_tpg, struct efct_lio_tpg, tpg);
153 struct efct_lio_vport *lio_vport = tpg->vport;
170 tpg->enabled = true;
171 efc_log_debug(efct, "enable portal group %d\n", tpg->tpgt);
194 efc_log_debug(efct, "disable portal group %d\n", tpg->tpgt);
196 tpg->enabled = false;
214 struct efct_lio_tpg *tpg =
215 container_of(se_tpg, struct efct_lio_tpg, tpg);
217 return tpg->nport->wwpn_str;
222 struct efct_lio_tpg *tpg =
223 container_of(se_tpg, struct efct_lio_tpg, tpg);
225 return tpg->vport->wwpn_str;
230 struct efct_lio_tpg *tpg =
231 container_of(se_tpg, struct efct_lio_tpg, tpg);
233 return tpg->tpgt;
238 struct efct_lio_tpg *tpg =
239 container_of(se_tpg, struct efct_lio_tpg, tpg);
241 return tpg->tpgt;
256 struct efct_lio_tpg *tpg =
257 container_of(se_tpg, struct efct_lio_tpg, tpg);
259 return tpg->tpg_attrib.demo_mode_write_protect;
265 struct efct_lio_tpg *tpg =
266 container_of(se_tpg, struct efct_lio_tpg, tpg);
268 return tpg->tpg_attrib.demo_mode_write_protect;
273 struct efct_lio_tpg *tpg =
274 container_of(se_tpg, struct efct_lio_tpg, tpg);
276 return tpg->tpg_attrib.prod_mode_write_protect;
282 struct efct_lio_tpg *tpg =
283 container_of(se_tpg, struct efct_lio_tpg, tpg);
285 return tpg->tpg_attrib.prod_mode_write_protect;
888 struct efct_lio_tpg *tpg;
898 tpg = kzalloc(sizeof(*tpg), GFP_KERNEL);
899 if (!tpg)
902 tpg->nport = lio_nport;
903 tpg->tpgt = n;
904 tpg->enabled = false;
906 tpg->tpg_attrib.generate_node_acls = 1;
907 tpg->tpg_attrib.demo_mode_write_protect = 1;
908 tpg->tpg_attrib.cache_dynamic_acls = 1;
909 tpg->tpg_attrib.demo_mode_login_only = 1;
910 tpg->tpg_attrib.session_deletion_wait = 1;
912 ret = core_tpg_register(wwn, &tpg->tpg, SCSI_PROTOCOL_FCP);
914 kfree(tpg);
918 efct->tgt_efct.tpg = tpg;
919 efc_log_debug(efct, "create portal group %d\n", tpg->tpgt);
922 return &tpg->tpg;
928 struct efct_lio_tpg *tpg =
929 container_of(se_tpg, struct efct_lio_tpg, tpg);
931 struct efct *efct = tpg->nport->efct;
933 efc_log_debug(efct, "drop portal group %d\n", tpg->tpgt);
934 tpg->nport->efct->tgt_efct.tpg = NULL;
937 kfree(tpg);
945 struct efct_lio_tpg *tpg;
961 tpg = kzalloc(sizeof(*tpg), GFP_KERNEL);
962 if (!tpg)
965 tpg->vport = lio_vport;
966 tpg->tpgt = n;
967 tpg->enabled = false;
969 tpg->tpg_attrib.generate_node_acls = 1;
970 tpg->tpg_attrib.demo_mode_write_protect = 1;
971 tpg->tpg_attrib.cache_dynamic_acls = 1;
972 tpg->tpg_attrib.demo_mode_login_only = 1;
973 tpg->tpg_attrib.session_deletion_wait = 1;
975 ret = core_tpg_register(wwn, &tpg->tpg, SCSI_PROTOCOL_FCP);
978 kfree(tpg);
981 lio_vport->tpg = tpg;
982 efc_log_debug(efct, "create vport portal group %d\n", tpg->tpgt);
984 return &tpg->tpg;
990 struct efct_lio_tpg *tpg =
991 container_of(se_tpg, struct efct_lio_tpg, tpg);
993 efc_log_debug(tpg->vport->efct, "drop npiv portal group %d\n",
994 tpg->tpgt);
996 kfree(tpg);
1017 struct efct_lio_tpg *tpg = container_of(stpg, struct efct_lio_tpg, tpg);
1019 return tpg->tpg_attrib.demo_mode_login_only;
1025 struct efct_lio_tpg *tpg = container_of(stpg, struct efct_lio_tpg, tpg);
1027 return tpg->tpg_attrib.demo_mode_login_only;
1037 struct efct_lio_tpg *tpg = NULL;
1046 efc_log_debug(efct, "found tpg on vport\n");
1047 tpg = lio_vport->tpg;
1052 return tpg;
1160 struct efct_lio_tpg *tpg;
1171 tpg = efct_get_vport_tpg(node);
1172 if (tpg) {
1173 se_tpg = &tpg->tpg;
1174 } else if (efct->tgt_efct.tpg) {
1175 tpg = efct->tgt_efct.tpg;
1176 se_tpg = &tpg->tpg;
1471 struct efct_lio_tpg *tpg = container_of(se_tpg, \
1472 struct efct_lio_tpg, tpg); \
1474 return sprintf(page, "%u\n", tpg->tpg_attrib.name); \
1481 struct efct_lio_tpg *tpg = container_of(se_tpg, \
1482 struct efct_lio_tpg, tpg); \
1483 struct efct_lio_tpg_attrib *a = &tpg->tpg_attrib; \
1527 struct efct_lio_tpg *tpg = container_of(se_tpg, \
1528 struct efct_lio_tpg, tpg); \
1530 return sprintf(page, "%u\n", tpg->tpg_attrib.name); \
1537 struct efct_lio_tpg *tpg = container_of(se_tpg, \
1538 struct efct_lio_tpg, tpg); \
1539 struct efct_lio_tpg_attrib *a = &tpg->tpg_attrib; \