Lines Matching refs:tpg_np
129 struct iscsi_tpg_np *tpg_np; in iscsit_get_tpg_from_np() local
142 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_get_tpg_from_np()
143 if (tpg_np->tpg_np == np) { in iscsit_get_tpg_from_np()
144 *tpg_np_out = tpg_np; in iscsit_get_tpg_from_np()
145 kref_get(&tpg_np->tpg_np_kref); in iscsit_get_tpg_from_np()
170 struct iscsi_tpg_np *tpg_np, in iscsit_clear_tpg_np_login_thread() argument
174 if (!tpg_np->tpg_np) { in iscsit_clear_tpg_np_login_thread()
180 tpg_np->tpg_np->enabled = false; in iscsit_clear_tpg_np_login_thread()
181 iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown); in iscsit_clear_tpg_np_login_thread()
188 struct iscsi_tpg_np *tpg_np; in iscsit_clear_tpg_np_login_threads() local
191 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_clear_tpg_np_login_threads()
192 if (!tpg_np->tpg_np) { in iscsit_clear_tpg_np_login_threads()
197 iscsit_clear_tpg_np_login_thread(tpg_np, tpg, shutdown); in iscsit_clear_tpg_np_login_threads()
402 struct iscsi_tpg_np *tpg_np, in iscsit_tpg_locate_child_np() argument
407 spin_lock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
409 &tpg_np->tpg_np_parent_list, tpg_np_child_list) { in iscsit_tpg_locate_child_np()
410 if (tpg_np_child->tpg_np->np_network_transport == in iscsit_tpg_locate_child_np()
412 spin_unlock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
416 spin_unlock(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_locate_child_np()
427 struct iscsi_tpg_np *tpg_np; in iscsit_tpg_check_network_portal() local
435 list_for_each_entry(tpg_np, &tpg->tpg_gnp_list, tpg_np_list) { in iscsit_tpg_check_network_portal()
436 np = tpg_np->tpg_np; in iscsit_tpg_check_network_portal()
460 struct iscsi_tpg_np *tpg_np; in iscsit_tpg_add_network_portal() local
472 tpg_np = kzalloc(sizeof(struct iscsi_tpg_np), GFP_KERNEL); in iscsit_tpg_add_network_portal()
473 if (!tpg_np) { in iscsit_tpg_add_network_portal()
481 kfree(tpg_np); in iscsit_tpg_add_network_portal()
485 INIT_LIST_HEAD(&tpg_np->tpg_np_list); in iscsit_tpg_add_network_portal()
486 INIT_LIST_HEAD(&tpg_np->tpg_np_child_list); in iscsit_tpg_add_network_portal()
487 INIT_LIST_HEAD(&tpg_np->tpg_np_parent_list); in iscsit_tpg_add_network_portal()
488 spin_lock_init(&tpg_np->tpg_np_parent_lock); in iscsit_tpg_add_network_portal()
489 init_completion(&tpg_np->tpg_np_comp); in iscsit_tpg_add_network_portal()
490 kref_init(&tpg_np->tpg_np_kref); in iscsit_tpg_add_network_portal()
491 tpg_np->tpg_np = np; in iscsit_tpg_add_network_portal()
492 tpg_np->tpg = tpg; in iscsit_tpg_add_network_portal()
495 list_add_tail(&tpg_np->tpg_np_list, &tpg->tpg_gnp_list); in iscsit_tpg_add_network_portal()
502 tpg_np->tpg_np_parent = tpg_np_parent; in iscsit_tpg_add_network_portal()
504 list_add_tail(&tpg_np->tpg_np_child_list, in iscsit_tpg_add_network_portal()
513 return tpg_np; in iscsit_tpg_add_network_portal()
517 struct iscsi_tpg_np *tpg_np, in iscsit_tpg_release_np() argument
521 iscsit_clear_tpg_np_login_thread(tpg_np, tpg, true); in iscsit_tpg_release_np()
527 tpg_np->tpg_np = NULL; in iscsit_tpg_release_np()
528 tpg_np->tpg = NULL; in iscsit_tpg_release_np()
529 kfree(tpg_np); in iscsit_tpg_release_np()
538 struct iscsi_tpg_np *tpg_np) in iscsit_tpg_del_network_portal() argument
544 np = tpg_np->tpg_np; in iscsit_tpg_del_network_portal()
551 if (!tpg_np->tpg_np_parent) { in iscsit_tpg_del_network_portal()
558 &tpg_np->tpg_np_parent_list, in iscsit_tpg_del_network_portal()
570 spin_lock(&tpg_np->tpg_np_parent->tpg_np_parent_lock); in iscsit_tpg_del_network_portal()
571 list_del(&tpg_np->tpg_np_child_list); in iscsit_tpg_del_network_portal()
572 spin_unlock(&tpg_np->tpg_np_parent->tpg_np_parent_lock); in iscsit_tpg_del_network_portal()
576 list_del(&tpg_np->tpg_np_list); in iscsit_tpg_del_network_portal()
582 return iscsit_tpg_release_np(tpg_np, tpg, np); in iscsit_tpg_del_network_portal()