Lines Matching refs:tpg
216 * local_port port_group (tpg) ops.
221 struct ft_tpg *tpg;
226 pr_debug("tcm_fc: add tpg %s\n", name);
246 tpg = kzalloc(sizeof(*tpg), GFP_KERNEL);
247 if (!tpg)
249 tpg->index = index;
250 tpg->lport_wwn = ft_wwn;
251 INIT_LIST_HEAD(&tpg->lun_list);
255 kfree(tpg);
259 ret = core_tpg_register(wwn, &tpg->se_tpg, SCSI_PROTOCOL_FCP);
262 kfree(tpg);
265 tpg->workqueue = wq;
268 ft_wwn->tpg = tpg;
271 return &tpg->se_tpg;
276 struct ft_tpg *tpg = container_of(se_tpg, struct ft_tpg, se_tpg);
277 struct ft_lport_wwn *ft_wwn = tpg->lport_wwn;
279 pr_debug("del tpg %s\n",
280 config_item_name(&tpg->se_tpg.tpg_group.cg_item));
282 destroy_workqueue(tpg->workqueue);
288 ft_wwn->tpg = NULL;
289 if (tpg->tport) {
290 tpg->tport->tpg = NULL;
291 tpg->tport = NULL;
296 kfree(tpg);
311 return ft_wwn->tpg;