Searched refs:se_tpg (Results 1 - 33 of 33) sorted by relevance

/linux-4.1.27/drivers/target/
H A Dtarget_core_tpg.c287 acl->se_tpg = tpg; core_tpg_check_initiator_node_acl()
414 acl->se_tpg = tpg; core_tpg_add_initiator_node_acl()
650 static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg) core_tpg_setup_virtual_lun0() argument
654 struct se_lun *lun = &se_tpg->tpg_virt_lun0; core_tpg_setup_virtual_lun0()
667 ret = core_tpg_add_lun(se_tpg, lun, lun_access, dev); core_tpg_setup_virtual_lun0()
677 struct se_portal_group *se_tpg, core_tpg_register()
684 se_tpg->tpg_lun_list = array_zalloc(TRANSPORT_MAX_LUNS_PER_TPG, core_tpg_register()
686 if (!se_tpg->tpg_lun_list) { core_tpg_register()
693 lun = se_tpg->tpg_lun_list[i]; core_tpg_register()
705 se_tpg->se_tpg_type = se_tpg_type; core_tpg_register()
706 se_tpg->se_tpg_fabric_ptr = tpg_fabric_ptr; core_tpg_register()
707 se_tpg->se_tpg_tfo = tfo; core_tpg_register()
708 se_tpg->se_tpg_wwn = se_wwn; core_tpg_register()
709 atomic_set(&se_tpg->tpg_pr_ref_count, 0); core_tpg_register()
710 INIT_LIST_HEAD(&se_tpg->acl_node_list); core_tpg_register()
711 INIT_LIST_HEAD(&se_tpg->se_tpg_node); core_tpg_register()
712 INIT_LIST_HEAD(&se_tpg->tpg_sess_list); core_tpg_register()
713 spin_lock_init(&se_tpg->acl_node_lock); core_tpg_register()
714 spin_lock_init(&se_tpg->session_lock); core_tpg_register()
715 spin_lock_init(&se_tpg->tpg_lun_lock); core_tpg_register()
717 if (se_tpg->se_tpg_type == TRANSPORT_TPG_TYPE_NORMAL) { core_tpg_register()
718 if (core_tpg_setup_virtual_lun0(se_tpg) < 0) { core_tpg_register()
719 array_free(se_tpg->tpg_lun_list, core_tpg_register()
726 list_add_tail(&se_tpg->se_tpg_node, &tpg_list); core_tpg_register()
731 (se_tpg->se_tpg_type == TRANSPORT_TPG_TYPE_NORMAL) ? core_tpg_register()
732 "Normal" : "Discovery", (tfo->tpg_get_wwn(se_tpg) == NULL) ? core_tpg_register()
733 "None" : tfo->tpg_get_wwn(se_tpg), tfo->tpg_get_tag(se_tpg)); core_tpg_register()
739 int core_tpg_deregister(struct se_portal_group *se_tpg) core_tpg_deregister() argument
745 (se_tpg->se_tpg_type == TRANSPORT_TPG_TYPE_NORMAL) ? core_tpg_deregister()
746 "Normal" : "Discovery", se_tpg->se_tpg_tfo->get_fabric_name(), core_tpg_deregister()
747 se_tpg->se_tpg_tfo->tpg_get_wwn(se_tpg), core_tpg_deregister()
748 se_tpg->se_tpg_tfo->tpg_get_tag(se_tpg)); core_tpg_deregister()
751 list_del(&se_tpg->se_tpg_node); core_tpg_deregister()
754 while (atomic_read(&se_tpg->tpg_pr_ref_count) != 0) core_tpg_deregister()
761 spin_lock_irq(&se_tpg->acl_node_lock); core_tpg_deregister()
762 list_for_each_entry_safe(nacl, nacl_tmp, &se_tpg->acl_node_list, core_tpg_deregister()
765 se_tpg->num_node_acls--; core_tpg_deregister()
766 spin_unlock_irq(&se_tpg->acl_node_lock); core_tpg_deregister()
769 core_free_device_list_for_node(nacl, se_tpg); core_tpg_deregister()
770 se_tpg->se_tpg_tfo->tpg_release_fabric_acl(se_tpg, nacl); core_tpg_deregister()
772 spin_lock_irq(&se_tpg->acl_node_lock); core_tpg_deregister()
774 spin_unlock_irq(&se_tpg->acl_node_lock); core_tpg_deregister()
776 if (se_tpg->se_tpg_type == TRANSPORT_TPG_TYPE_NORMAL) core_tpg_deregister()
777 core_tpg_remove_lun(se_tpg, &se_tpg->tpg_virt_lun0); core_tpg_deregister()
779 se_tpg->se_tpg_fabric_ptr = NULL; core_tpg_deregister()
780 array_free(se_tpg->tpg_lun_list, TRANSPORT_MAX_LUNS_PER_TPG); core_tpg_deregister()
674 core_tpg_register( const struct target_core_fabric_ops *tfo, struct se_wwn *se_wwn, struct se_portal_group *se_tpg, void *tpg_fabric_ptr, int se_tpg_type) core_tpg_register() argument
H A Dtarget_core_fabric_configfs.c84 struct se_portal_group *se_tpg; target_fabric_mappedlun_link() local
101 se_tpg = lun->lun_sep->sep_tpg; target_fabric_mappedlun_link()
134 (se_tpg->se_tpg_tfo->tpg_check_prod_mode_write_protect( target_fabric_mappedlun_link()
135 se_tpg)) ? TRANSPORT_LUNFLAGS_READ_ONLY : target_fabric_mappedlun_link()
144 ret = core_dev_add_initiator_node_lun_acl(se_tpg, lacl, target_fabric_mappedlun_link()
159 struct se_portal_group *se_tpg; target_fabric_mappedlun_unlink() local
167 se_tpg = lun->lun_sep->sep_tpg; target_fabric_mappedlun_unlink()
169 core_dev_del_initiator_node_lun_acl(se_tpg, lun, lacl); target_fabric_mappedlun_unlink()
204 struct se_portal_group *se_tpg = se_nacl->se_tpg; target_fabric_mappedlun_store_write_protect() local
222 se_tpg->se_tpg_tfo->get_fabric_name(), target_fabric_mappedlun_store_write_protect()
237 struct se_portal_group *se_tpg = lacl->se_lun_nacl->se_tpg; target_fabric_mappedlun_release() local
239 core_dev_free_initiator_node_lun_acl(se_tpg, lacl); target_fabric_mappedlun_release()
335 struct se_portal_group *se_tpg = se_nacl->se_tpg; target_fabric_make_mappedlun() local
336 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_make_mappedlun()
380 se_tpg->se_tpg_tfo->tpg_get_tag(se_tpg)); target_fabric_make_mappedlun()
385 lacl = core_dev_init_initiator_node_lun_acl(se_tpg, se_nacl, target_fabric_make_mappedlun()
461 struct se_portal_group *se_tpg = se_nacl->se_tpg; target_fabric_nacl_base_release() local
462 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_nacl_base_release()
498 struct se_portal_group *se_tpg = container_of(group, target_fabric_make_nodeacl() local
500 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_make_nodeacl()
509 se_nacl = tf->tf_ops.fabric_make_nodeacl(se_tpg, group, name); target_fabric_make_nodeacl()
575 struct se_portal_group *se_tpg = se_tpg_np->tpg_np_parent; target_fabric_np_base_release() local
576 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_np_base_release()
597 struct se_portal_group *se_tpg = container_of(group, target_fabric_make_np() local
599 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_make_np()
607 se_tpg_np = tf->tf_ops.fabric_make_np(se_tpg, group, name); target_fabric_make_np()
611 se_tpg_np->tpg_np_parent = se_tpg; target_fabric_make_np()
773 struct se_portal_group *se_tpg; target_fabric_port_link() local
791 se_tpg = container_of(to_config_group(tpg_ci), target_fabric_port_link()
793 tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_port_link()
800 lun_p = core_dev_add_lun(se_tpg, dev, lun->unpacked_lun); target_fabric_port_link()
813 tf->tf_ops.fabric_post_link(se_tpg, lun); target_fabric_port_link()
827 struct se_portal_group *se_tpg = lun->lun_sep->sep_tpg; target_fabric_port_unlink() local
828 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_port_unlink()
836 tf->tf_ops.fabric_pre_unlink(se_tpg, lun); target_fabric_port_unlink()
839 core_dev_del_lun(se_tpg, lun); target_fabric_port_unlink()
886 struct se_portal_group *se_tpg = container_of(group, target_fabric_make_lun() local
888 struct target_fabric_configfs *tf = se_tpg->se_tpg_wwn->wwn_tf; target_fabric_make_lun()
904 lun = core_get_lun_from_tpg(se_tpg, unpacked_lun); target_fabric_make_lun()
1021 struct se_portal_group *se_tpg = container_of(to_config_group(item), target_fabric_tpg_release() local
1023 struct se_wwn *wwn = se_tpg->se_tpg_wwn; target_fabric_tpg_release()
1026 tf->tf_ops.fabric_drop_tpg(se_tpg); target_fabric_tpg_release()
1047 struct se_portal_group *se_tpg; target_fabric_make_tpg() local
1054 se_tpg = tf->tf_ops.fabric_make_tpg(wwn, group, name); target_fabric_make_tpg()
1055 if (!se_tpg || IS_ERR(se_tpg)) target_fabric_make_tpg()
1058 * Setup default groups from pre-allocated se_tpg->tpg_default_groups target_fabric_make_tpg()
1060 se_tpg->tpg_group.default_groups = se_tpg->tpg_default_groups; target_fabric_make_tpg()
1061 se_tpg->tpg_group.default_groups[0] = &se_tpg->tpg_lun_group; target_fabric_make_tpg()
1062 se_tpg->tpg_group.default_groups[1] = &se_tpg->tpg_np_group; target_fabric_make_tpg()
1063 se_tpg->tpg_group.default_groups[2] = &se_tpg->tpg_acl_group; target_fabric_make_tpg()
1064 se_tpg->tpg_group.default_groups[3] = &se_tpg->tpg_attrib_group; target_fabric_make_tpg()
1065 se_tpg->tpg_group.default_groups[4] = &se_tpg->tpg_auth_group; target_fabric_make_tpg()
1066 se_tpg->tpg_group.default_groups[5] = &se_tpg->tpg_param_group; target_fabric_make_tpg()
1067 se_tpg->tpg_group.default_groups[6] = NULL; target_fabric_make_tpg()
1069 config_group_init_type_name(&se_tpg->tpg_group, name, target_fabric_make_tpg()
1071 config_group_init_type_name(&se_tpg->tpg_lun_group, "lun", target_fabric_make_tpg()
1073 config_group_init_type_name(&se_tpg->tpg_np_group, "np", target_fabric_make_tpg()
1075 config_group_init_type_name(&se_tpg->tpg_acl_group, "acls", target_fabric_make_tpg()
1077 config_group_init_type_name(&se_tpg->tpg_attrib_group, "attrib", target_fabric_make_tpg()
1079 config_group_init_type_name(&se_tpg->tpg_auth_group, "auth", target_fabric_make_tpg()
1081 config_group_init_type_name(&se_tpg->tpg_param_group, "param", target_fabric_make_tpg()
1084 return &se_tpg->tpg_group; target_fabric_make_tpg()
1091 struct se_portal_group *se_tpg = container_of(to_config_group(item), target_fabric_drop_tpg() local
1093 struct config_group *tpg_cg = &se_tpg->tpg_group; target_fabric_drop_tpg()
1098 * memory as it is statically allocated at se_tpg->tpg_default_groups. target_fabric_drop_tpg()
H A Dtarget_core_fabric_lib.c45 u8 sas_get_fabric_proto_ident(struct se_portal_group *se_tpg) sas_get_fabric_proto_ident() argument
56 struct se_portal_group *se_tpg, sas_get_pr_transport_id()
87 struct se_portal_group *se_tpg, sas_get_pr_transport_id_len()
108 struct se_portal_group *se_tpg, sas_parse_pr_out_transport_id()
131 u8 fc_get_fabric_proto_ident(struct se_portal_group *se_tpg) fc_get_fabric_proto_ident() argument
138 struct se_portal_group *se_tpg, fc_get_pr_transport_id_len()
152 struct se_portal_group *se_tpg, fc_get_pr_transport_id()
191 struct se_portal_group *se_tpg, fc_parse_pr_out_transport_id()
212 u8 iscsi_get_fabric_proto_ident(struct se_portal_group *se_tpg) iscsi_get_fabric_proto_ident() argument
223 struct se_portal_group *se_tpg, iscsi_get_pr_transport_id()
319 struct se_portal_group *se_tpg, iscsi_get_pr_transport_id_len()
365 struct se_portal_group *se_tpg, iscsi_parse_pr_out_transport_id()
55 sas_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) sas_get_pr_transport_id() argument
86 sas_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) sas_get_pr_transport_id_len() argument
107 sas_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) sas_parse_pr_out_transport_id() argument
137 fc_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) fc_get_pr_transport_id_len() argument
151 fc_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) fc_get_pr_transport_id() argument
190 fc_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) fc_parse_pr_out_transport_id() argument
222 iscsi_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) iscsi_get_pr_transport_id() argument
318 iscsi_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) iscsi_get_pr_transport_id_len() argument
364 iscsi_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) iscsi_parse_pr_out_transport_id() argument
H A Dtarget_core_transport.c320 struct se_portal_group *se_tpg, __transport_register_session()
325 const struct target_core_fabric_ops *tfo = se_tpg->se_tpg_tfo; __transport_register_session()
328 se_sess->se_tpg = se_tpg; __transport_register_session()
351 tfo->tpg_check_prot_fabric_only(se_tpg); __transport_register_session()
356 if (se_tpg->se_tpg_tfo->sess_get_initiator_sid != NULL) { __transport_register_session()
358 se_tpg->se_tpg_tfo->sess_get_initiator_sid(se_sess, __transport_register_session()
375 list_add_tail(&se_sess->sess_list, &se_tpg->tpg_sess_list); __transport_register_session()
378 se_tpg->se_tpg_tfo->get_fabric_name(), se_sess->fabric_sess_ptr); __transport_register_session()
383 struct se_portal_group *se_tpg, transport_register_session()
390 spin_lock_irqsave(&se_tpg->session_lock, flags); transport_register_session()
391 __transport_register_session(se_tpg, se_nacl, se_sess, fabric_sess_ptr); transport_register_session()
392 spin_unlock_irqrestore(&se_tpg->session_lock, flags); transport_register_session()
400 struct se_portal_group *se_tpg = se_sess->se_tpg; target_release_session() local
402 se_tpg->se_tpg_tfo->close_session(se_sess); target_release_session()
413 struct se_portal_group *tpg = se_sess->se_tpg; target_put_session()
423 ssize_t target_show_dynamic_sessions(struct se_portal_group *se_tpg, char *page) target_show_dynamic_sessions() argument
428 spin_lock_bh(&se_tpg->session_lock); target_show_dynamic_sessions()
429 list_for_each_entry(se_sess, &se_tpg->tpg_sess_list, sess_list) { target_show_dynamic_sessions()
441 spin_unlock_bh(&se_tpg->session_lock); target_show_dynamic_sessions()
504 struct se_portal_group *se_tpg = se_sess->se_tpg; transport_deregister_session() local
510 if (!se_tpg) { transport_deregister_session()
514 se_tfo = se_tpg->se_tpg_tfo; transport_deregister_session()
516 spin_lock_irqsave(&se_tpg->session_lock, flags); transport_deregister_session()
518 se_sess->se_tpg = NULL; transport_deregister_session()
520 spin_unlock_irqrestore(&se_tpg->session_lock, flags); transport_deregister_session()
528 spin_lock_irqsave(&se_tpg->acl_node_lock, flags); transport_deregister_session()
530 if (!se_tfo->tpg_check_demo_mode_cache(se_tpg)) { transport_deregister_session()
532 se_tpg->num_node_acls--; transport_deregister_session()
533 spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags); transport_deregister_session()
535 core_free_device_list_for_node(se_nacl, se_tpg); transport_deregister_session()
536 se_tfo->tpg_release_fabric_acl(se_tpg, se_nacl); transport_deregister_session()
539 spin_lock_irqsave(&se_tpg->acl_node_lock, flags); transport_deregister_session()
542 spin_unlock_irqrestore(&se_tpg->acl_node_lock, flags); transport_deregister_session()
545 se_tpg->se_tpg_tfo->get_fabric_name()); transport_deregister_session()
1398 struct se_portal_group *se_tpg; target_submit_cmd_map_sgls() local
1402 se_tpg = se_sess->se_tpg; target_submit_cmd_map_sgls()
1403 BUG_ON(!se_tpg); target_submit_cmd_map_sgls()
1411 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, target_submit_cmd_map_sgls()
1566 struct se_portal_group *se_tpg; target_submit_tmr() local
1569 se_tpg = se_sess->se_tpg; target_submit_tmr()
1570 BUG_ON(!se_tpg); target_submit_tmr()
1572 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, target_submit_tmr()
319 __transport_register_session( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct se_session *se_sess, void *fabric_sess_ptr) __transport_register_session() argument
382 transport_register_session( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct se_session *se_sess, void *fabric_sess_ptr) transport_register_session() argument
H A Dtarget_core_ua.c173 nacl->se_tpg->se_tpg_tfo->get_fabric_name(), unpacked_lun, core_scsi3_ua_allocate()
258 nacl->se_tpg->se_tpg_tfo->get_fabric_name(), core_scsi3_ua_for_check_condition()
315 " ASCQ: 0x%02x\n", nacl->se_tpg->se_tpg_tfo->get_fabric_name(), core_scsi3_ua_clear_for_request_sense()
H A Dtarget_core_pr.c209 if (!sess || !sess->se_tpg) target_scsi2_reservation_release()
233 tpg = sess->se_tpg; target_scsi2_reservation_release()
265 if (!sess || !sess->se_tpg) target_scsi2_reservation_reserve()
274 tpg = sess->se_tpg; target_scsi2_reservation_reserve()
686 const struct target_core_fabric_ops *tfo = nacl->se_tpg->se_tpg_tfo; __core_scsi3_alloc_registration()
734 if (tfo != nacl_tmp->se_tpg->se_tpg_tfo) __core_scsi3_alloc_registration()
991 struct se_portal_group *se_tpg = nacl->se_tpg; __core_scsi3_dump_registration() local
1003 tfo->get_fabric_name(), tfo->tpg_get_wwn(se_tpg), __core_scsi3_dump_registration()
1004 tfo->tpg_get_tag(se_tpg)); __core_scsi3_dump_registration()
1026 const struct target_core_fabric_ops *tfo = nacl->se_tpg->se_tpg_tfo; __core_scsi3_add_registration()
1122 tpg = pr_reg->pr_reg_nacl->se_tpg; __core_scsi3_locate_pr_reg()
1165 struct se_portal_group *tpg = nacl->se_tpg; core_scsi3_locate_pr_reg()
1246 pr_reg->pr_reg_nacl->se_tpg->se_tpg_tfo;
1408 tpg = nacl->se_tpg; core_scsi3_lunacl_depend_item()
1426 tpg = nacl->se_tpg; core_scsi3_lunacl_undepend_item()
1842 tpg = pr_reg->pr_reg_nacl->se_tpg; core_scsi3_update_aptpl_buf()
2008 struct se_portal_group *se_tpg; core_scsi3_emulate_pro_register() local
2019 se_tpg = se_sess->se_tpg; core_scsi3_emulate_pro_register()
2022 if (se_tpg->se_tpg_tfo->sess_get_initiator_sid) { core_scsi3_emulate_pro_register()
2024 se_tpg->se_tpg_tfo->sess_get_initiator_sid(se_sess, &isid_buf[0], core_scsi3_emulate_pro_register()
2067 ret = core_scsi3_decode_spec_i_port(cmd, se_tpg, core_scsi3_emulate_pro_register()
2310 pr_res_nacl->se_tpg->se_tpg_tfo->get_fabric_name(), core_scsi3_pro_reserve()
2333 pr_res_nacl->se_tpg->se_tpg_tfo->get_fabric_name(), core_scsi3_pro_reserve()
2412 const struct target_core_fabric_ops *tfo = se_nacl->se_tpg->se_tpg_tfo; __core_scsi3_complete_pro_release()
2563 pr_res_nacl->se_tpg->se_tpg_tfo->get_fabric_name(), core_scsi3_emulate_pro_release()
2724 const struct target_core_fabric_ops *tfo = nacl->se_tpg->se_tpg_tfo; __core_scsi3_complete_pro_preempt()
3108 struct se_portal_group *se_tpg, *dest_se_tpg = NULL; core_scsi3_emulate_pro_register_and_move() local
3127 se_tpg = se_sess->se_tpg; core_scsi3_emulate_pro_register_and_move()
3128 tf_ops = se_tpg->se_tpg_tfo; core_scsi3_emulate_pro_register_and_move()
3885 struct se_portal_group *se_tpg; core_scsi3_pri_read_full_status() local
3927 se_tpg = pr_reg->pr_reg_nacl->se_tpg; core_scsi3_pri_read_full_status()
3936 exp_desc_len = se_tpg->se_tpg_tfo->tpg_get_pr_transport_id_len( core_scsi3_pri_read_full_status()
3937 se_tpg, se_nacl, pr_reg, &format_code); core_scsi3_pri_read_full_status()
4006 desc_len = se_tpg->se_tpg_tfo->tpg_get_pr_transport_id(se_tpg, core_scsi3_pri_read_full_status()
H A Dtarget_core_stat.c1094 tpg = nacl->se_tpg; target_stat_scsi_auth_intr_show_attr_inst()
1143 tpg = nacl->se_tpg; target_stat_scsi_auth_intr_show_attr_port()
1460 tpg = nacl->se_tpg; target_stat_scsi_att_intr_port_show_attr_inst()
1509 tpg = nacl->se_tpg; target_stat_scsi_att_intr_port_show_attr_port()
1534 tpg = nacl->se_tpg; target_stat_scsi_att_intr_port_show_attr_indx()
1583 tpg = nacl->se_tpg; target_stat_scsi_att_intr_port_show_attr_port_ident()
H A Dtarget_core_configfs.c787 se_nacl->se_tpg->se_tpg_tfo->get_fabric_name(), target_core_dev_pr_show_spc3_res()
801 se_nacl->se_tpg->se_tpg_tfo->get_fabric_name(), target_core_dev_pr_show_spc2_res()
866 struct se_portal_group *se_tpg; target_core_dev_pr_show_attr_res_pr_holder_tg_port() local
879 se_tpg = se_nacl->se_tpg; target_core_dev_pr_show_attr_res_pr_holder_tg_port()
881 tfo = se_tpg->se_tpg_tfo; target_core_dev_pr_show_attr_res_pr_holder_tg_port()
885 tfo->tpg_get_wwn(se_tpg)); target_core_dev_pr_show_attr_res_pr_holder_tg_port()
889 tfo->get_fabric_name(), tfo->tpg_get_tag(se_tpg), target_core_dev_pr_show_attr_res_pr_holder_tg_port()
917 tfo = pr_reg->pr_reg_nacl->se_tpg->se_tpg_tfo; target_core_dev_pr_show_attr_res_pr_registered_i_pts()
H A Dtarget_core_alua.c1263 struct se_portal_group *se_tpg = port->sep_tpg; core_alua_update_tpg_secondary_metadata() local
1277 se_tpg->se_tpg_tfo->tpg_get_wwn(se_tpg)); core_alua_update_tpg_secondary_metadata()
1279 if (se_tpg->se_tpg_tfo->tpg_get_tag != NULL) core_alua_update_tpg_secondary_metadata()
1281 se_tpg->se_tpg_tfo->tpg_get_tag(se_tpg)); core_alua_update_tpg_secondary_metadata()
1289 se_tpg->se_tpg_tfo->get_fabric_name(), wwn, core_alua_update_tpg_secondary_metadata()
H A Dtarget_core_tmr.c427 tmr_tpg = tmr_sess->se_tpg; core_tmr_lun_reset()
H A Dtarget_core_device.c122 se_lun = &se_sess->se_tpg->tpg_virt_lun0; transport_lookup_cmd_lun()
123 se_cmd->se_lun = &se_sess->se_tpg->tpg_virt_lun0; transport_lookup_cmd_lun()
201 struct se_portal_group *tpg = nacl->se_tpg; core_get_se_deve_from_rtpi()
H A Dtarget_core_xcopy.c471 xcopy_pt_nacl.se_tpg = &xcopy_pt_tpg; target_xcopy_setup_pt()
474 xcopy_pt_sess.se_tpg = &xcopy_pt_tpg; target_xcopy_setup_pt()
/linux-4.1.27/drivers/target/tcm_fc/
H A Dtfc_conf.c202 struct se_portal_group *se_tpg, ft_add_acl()
212 tpg = container_of(se_tpg, struct ft_tpg, se_tpg); ft_add_acl()
223 return core_tpg_add_initiator_node_acl(&tpg->se_tpg, ft_add_acl()
229 struct se_portal_group *se_tpg = se_acl->se_tpg; ft_del_acl() local
237 tpg = container_of(se_tpg, struct ft_tpg, se_tpg); ft_del_acl()
238 pr_debug("del acl %p se_acl %p tpg %p se_tpg %p\n", ft_del_acl()
239 acl, se_acl, tpg, &tpg->se_tpg); ft_del_acl()
241 core_tpg_del_initiator_node_acl(&tpg->se_tpg, se_acl, 1); ft_del_acl()
249 struct se_portal_group *se_tpg = &tpg->se_tpg; ft_acl_get() local
252 spin_lock_irq(&se_tpg->acl_node_lock); ft_acl_get()
253 list_for_each_entry(se_acl, &se_tpg->acl_node_list, acl_list) { ft_acl_get()
266 spin_unlock_irq(&se_tpg->acl_node_lock); ft_acl_get()
270 static struct se_node_acl *ft_tpg_alloc_fabric_acl(struct se_portal_group *se_tpg) ft_tpg_alloc_fabric_acl() argument
283 static void ft_tpg_release_fabric_acl(struct se_portal_group *se_tpg, ft_tpg_release_fabric_acl() argument
340 ret = core_tpg_register(&ft_fabric_ops, wwn, &tpg->se_tpg, ft_add_tpg()
353 return &tpg->se_tpg; ft_add_tpg()
356 static void ft_del_tpg(struct se_portal_group *se_tpg) ft_del_tpg() argument
358 struct ft_tpg *tpg = container_of(se_tpg, struct ft_tpg, se_tpg); ft_del_tpg()
362 config_item_name(&tpg->se_tpg.tpg_group.cg_item)); ft_del_tpg()
377 core_tpg_deregister(se_tpg); ft_del_tpg()
471 static char *ft_get_fabric_wwn(struct se_portal_group *se_tpg) ft_get_fabric_wwn() argument
473 struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; ft_get_fabric_wwn()
478 static u16 ft_get_tag(struct se_portal_group *se_tpg) ft_get_tag() argument
480 struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; ft_get_tag()
489 static u32 ft_get_default_depth(struct se_portal_group *se_tpg) ft_get_default_depth() argument
494 static int ft_check_false(struct se_portal_group *se_tpg) ft_check_false() argument
503 static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg) ft_tpg_get_inst_index() argument
505 struct ft_tpg *tpg = se_tpg->se_tpg_fabric_ptr; ft_tpg_get_inst_index()
201 ft_add_acl( struct se_portal_group *se_tpg, struct config_group *group, const char *name) ft_add_acl() argument
H A Dtcm_fc.h100 struct se_portal_group se_tpg; member in struct:ft_tpg
H A Dtfc_sess.c230 transport_register_session(&tport->tpg->se_tpg, &acl->se_node_acl, ft_sess_create()
/linux-4.1.27/drivers/target/loopback/
H A Dtcm_loop.c224 struct se_portal_group *se_tpg; tcm_loop_issue_tmr() local
254 se_tpg = &tl_tpg->tl_se_tpg; tcm_loop_issue_tmr()
259 transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess, 0, tcm_loop_issue_tmr()
523 static u8 tcm_loop_get_fabric_proto_ident(struct se_portal_group *se_tpg) tcm_loop_get_fabric_proto_ident() argument
525 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_get_fabric_proto_ident()
536 return sas_get_fabric_proto_ident(se_tpg); tcm_loop_get_fabric_proto_ident()
538 return fc_get_fabric_proto_ident(se_tpg); tcm_loop_get_fabric_proto_ident()
540 return iscsi_get_fabric_proto_ident(se_tpg); tcm_loop_get_fabric_proto_ident()
547 return sas_get_fabric_proto_ident(se_tpg); tcm_loop_get_fabric_proto_ident()
550 static char *tcm_loop_get_endpoint_wwn(struct se_portal_group *se_tpg) tcm_loop_get_endpoint_wwn() argument
552 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_get_endpoint_wwn()
559 static u16 tcm_loop_get_tag(struct se_portal_group *se_tpg) tcm_loop_get_tag() argument
561 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_get_tag()
569 static u32 tcm_loop_get_default_depth(struct se_portal_group *se_tpg) tcm_loop_get_default_depth() argument
575 struct se_portal_group *se_tpg, tcm_loop_get_pr_transport_id()
581 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_get_pr_transport_id()
586 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
589 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
592 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
600 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id()
605 struct se_portal_group *se_tpg, tcm_loop_get_pr_transport_id_len()
610 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_get_pr_transport_id_len()
615 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
618 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
621 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
629 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_loop_get_pr_transport_id_len()
638 struct se_portal_group *se_tpg, tcm_loop_parse_pr_out_transport_id()
643 struct tcm_loop_tpg *tl_tpg = se_tpg->se_tpg_fabric_ptr; tcm_loop_parse_pr_out_transport_id()
648 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, tcm_loop_parse_pr_out_transport_id()
651 return fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, tcm_loop_parse_pr_out_transport_id()
654 return iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, tcm_loop_parse_pr_out_transport_id()
662 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, tcm_loop_parse_pr_out_transport_id()
670 static int tcm_loop_check_demo_mode(struct se_portal_group *se_tpg) tcm_loop_check_demo_mode() argument
675 static int tcm_loop_check_demo_mode_cache(struct se_portal_group *se_tpg) tcm_loop_check_demo_mode_cache() argument
684 static int tcm_loop_check_demo_mode_write_protect(struct se_portal_group *se_tpg) tcm_loop_check_demo_mode_write_protect() argument
694 static int tcm_loop_check_prod_mode_write_protect(struct se_portal_group *se_tpg) tcm_loop_check_prod_mode_write_protect() argument
699 static int tcm_loop_check_prot_fabric_only(struct se_portal_group *se_tpg) tcm_loop_check_prot_fabric_only() argument
701 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tcm_loop_check_prot_fabric_only()
707 struct se_portal_group *se_tpg) tcm_loop_tpg_alloc_fabric_acl()
721 struct se_portal_group *se_tpg, tcm_loop_tpg_release_fabric_acl()
730 static u32 tcm_loop_get_inst_index(struct se_portal_group *se_tpg) tcm_loop_get_inst_index() argument
873 struct se_portal_group *se_tpg, tcm_loop_port_link()
876 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_port_link()
891 struct se_portal_group *se_tpg, tcm_loop_port_unlink()
898 tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tl_se_tpg); tcm_loop_port_unlink()
922 struct se_portal_group *se_tpg, tcm_loop_tpg_attrib_show_fabric_prot_type()
925 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tcm_loop_tpg_attrib_show_fabric_prot_type()
932 struct se_portal_group *se_tpg, tcm_loop_tpg_attrib_store_fabric_prot_type()
936 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, struct tcm_loop_tpg, tcm_loop_tpg_attrib_store_fabric_prot_type()
967 struct se_portal_group *se_tpg; tcm_loop_make_nexus() local
976 se_tpg = &tl_tpg->tl_se_tpg; tcm_loop_make_nexus()
998 se_tpg, (unsigned char *)name); tcm_loop_make_nexus()
1004 transport_register_session(se_tpg, tl_nexus->se_sess->se_node_acl, tcm_loop_make_nexus()
1053 struct se_portal_group *se_tpg, tcm_loop_tpg_show_nexus()
1056 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_tpg_show_nexus()
1072 struct se_portal_group *se_tpg, tcm_loop_tpg_store_nexus()
1076 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_tpg_store_nexus()
1153 struct se_portal_group *se_tpg, tcm_loop_tpg_show_transport_status()
1156 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_tpg_show_transport_status()
1179 struct se_portal_group *se_tpg, tcm_loop_tpg_store_transport_status()
1183 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_tpg_store_transport_status()
1250 struct se_portal_group *se_tpg) tcm_loop_drop_naa_tpg()
1252 struct se_wwn *wwn = se_tpg->se_tpg_wwn; tcm_loop_drop_naa_tpg()
1253 struct tcm_loop_tpg *tl_tpg = container_of(se_tpg, tcm_loop_drop_naa_tpg()
1267 core_tpg_deregister(se_tpg); tcm_loop_drop_naa_tpg()
574 tcm_loop_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) tcm_loop_get_pr_transport_id() argument
604 tcm_loop_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) tcm_loop_get_pr_transport_id_len() argument
637 tcm_loop_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) tcm_loop_parse_pr_out_transport_id() argument
706 tcm_loop_tpg_alloc_fabric_acl( struct se_portal_group *se_tpg) tcm_loop_tpg_alloc_fabric_acl() argument
720 tcm_loop_tpg_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) tcm_loop_tpg_release_fabric_acl() argument
872 tcm_loop_port_link( struct se_portal_group *se_tpg, struct se_lun *lun) tcm_loop_port_link() argument
890 tcm_loop_port_unlink( struct se_portal_group *se_tpg, struct se_lun *se_lun) tcm_loop_port_unlink() argument
921 tcm_loop_tpg_attrib_show_fabric_prot_type( struct se_portal_group *se_tpg, char *page) tcm_loop_tpg_attrib_show_fabric_prot_type() argument
931 tcm_loop_tpg_attrib_store_fabric_prot_type( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_loop_tpg_attrib_store_fabric_prot_type() argument
1052 tcm_loop_tpg_show_nexus( struct se_portal_group *se_tpg, char *page) tcm_loop_tpg_show_nexus() argument
1071 tcm_loop_tpg_store_nexus( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_loop_tpg_store_nexus() argument
1152 tcm_loop_tpg_show_transport_status( struct se_portal_group *se_tpg, char *page) tcm_loop_tpg_show_transport_status() argument
1178 tcm_loop_tpg_store_transport_status( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_loop_tpg_store_transport_status() argument
1249 tcm_loop_drop_naa_tpg( struct se_portal_group *se_tpg) tcm_loop_drop_naa_tpg() argument
/linux-4.1.27/drivers/target/iscsi/
H A Discsi_target_configfs.c217 struct se_portal_group *se_tpg, lio_target_call_addnptotpg()
298 tpg = container_of(se_tpg, struct iscsi_portal_group, tpg_se_tpg); lio_target_call_addnptotpg()
305 config_item_name(&se_tpg->se_tpg_wwn->wwn_group.cg_item), lio_target_call_addnptotpg()
337 struct se_portal_group *se_tpg; lio_target_call_delnpfromtpg() local
346 se_tpg = &tpg->tpg_se_tpg; lio_target_call_delnpfromtpg()
348 " PORTAL: %pISc:%hu\n", config_item_name(&se_tpg->se_tpg_wwn->wwn_group.cg_item), lio_target_call_delnpfromtpg()
782 struct se_portal_group *se_tpg = se_nacl->se_tpg; lio_target_nacl_store_cmdsn_depth() local
783 struct iscsi_portal_group *tpg = container_of(se_tpg, lio_target_nacl_store_cmdsn_depth()
847 ret = core_tpg_set_initiator_node_tag(se_nacl->se_tpg, se_nacl, page); lio_target_nacl_store_tag()
864 struct se_portal_group *se_tpg) lio_tpg_alloc_fabric_acl()
878 struct se_portal_group *se_tpg, lio_target_make_nodeacl()
885 struct iscsi_portal_group *tpg = container_of(se_tpg, lio_target_make_nodeacl()
889 se_nacl_new = lio_tpg_alloc_fabric_acl(se_tpg); lio_target_make_nodeacl()
898 se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new, lio_target_make_nodeacl()
911 core_tpg_del_initiator_node_acl(se_tpg, se_nacl, 1); lio_target_make_nodeacl()
927 struct se_portal_group *se_tpg = se_nacl->se_tpg; lio_target_drop_nodeacl() local
942 core_tpg_del_initiator_node_acl(se_tpg, se_nacl, 1); lio_target_drop_nodeacl()
953 struct se_portal_group *se_tpg, \
956 struct iscsi_portal_group *tpg = container_of(se_tpg, \
969 struct se_portal_group *se_tpg, \
973 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1080 struct se_portal_group *se_tpg, \
1083 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1094 struct se_portal_group *se_tpg, \
1098 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1122 struct se_portal_group *se_tpg, \
1125 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1138 struct se_portal_group *se_tpg, \
1141 return __iscsi_tpg_auth_show_##name(se_tpg, page); \
1145 struct se_portal_group *se_tpg, \
1149 return __iscsi_tpg_auth_store_##name(se_tpg, page, count); \
1155 struct se_portal_group *se_tpg, \
1158 return __iscsi_tpg_auth_show_##name(se_tpg, page); \
1205 struct se_portal_group *se_tpg, \
1208 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1228 struct se_portal_group *se_tpg, \
1232 struct iscsi_portal_group *tpg = container_of(se_tpg, \
1357 struct se_portal_group *se_tpg, lio_target_tpg_show_enable()
1360 struct iscsi_portal_group *tpg = container_of(se_tpg, lio_target_tpg_show_enable()
1373 struct se_portal_group *se_tpg, lio_target_tpg_store_enable()
1377 struct iscsi_portal_group *tpg = container_of(se_tpg, lio_target_tpg_store_enable()
1417 struct se_portal_group *se_tpg, lio_target_tpg_show_dynamic_sessions()
1420 return target_show_dynamic_sessions(se_tpg, page); lio_target_tpg_show_dynamic_sessions()
1485 static void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg) lio_target_tiqn_deltpg() argument
1490 tpg = container_of(se_tpg, struct iscsi_portal_group, tpg_se_tpg); lio_target_tiqn_deltpg()
1835 static char *lio_tpg_get_endpoint_wwn(struct se_portal_group *se_tpg) lio_tpg_get_endpoint_wwn() argument
1837 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_get_endpoint_wwn()
1842 static u16 lio_tpg_get_tag(struct se_portal_group *se_tpg) lio_tpg_get_tag() argument
1844 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_get_tag()
1849 static u32 lio_tpg_get_default_depth(struct se_portal_group *se_tpg) lio_tpg_get_default_depth() argument
1851 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_get_default_depth()
1856 static int lio_tpg_check_demo_mode(struct se_portal_group *se_tpg) lio_tpg_check_demo_mode() argument
1858 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_check_demo_mode()
1863 static int lio_tpg_check_demo_mode_cache(struct se_portal_group *se_tpg) lio_tpg_check_demo_mode_cache() argument
1865 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_check_demo_mode_cache()
1871 struct se_portal_group *se_tpg) lio_tpg_check_demo_mode_write_protect()
1873 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_check_demo_mode_write_protect()
1879 struct se_portal_group *se_tpg) lio_tpg_check_prod_mode_write_protect()
1881 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_check_prod_mode_write_protect()
1887 struct se_portal_group *se_tpg) lio_tpg_check_prot_fabric_only()
1889 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_check_prot_fabric_only()
1901 struct se_portal_group *se_tpg, lio_tpg_release_fabric_acl()
1919 struct se_portal_group *se_tpg = se_sess->se_tpg; lio_tpg_shutdown_session() local
1922 if (!spin_is_locked(&se_tpg->session_lock)) { lio_tpg_shutdown_session()
1923 spin_lock_irq(&se_tpg->session_lock); lio_tpg_shutdown_session()
1940 spin_unlock_irq(&se_tpg->session_lock); lio_tpg_shutdown_session()
1944 spin_lock_irq(&se_tpg->session_lock); lio_tpg_shutdown_session()
1963 static u32 lio_tpg_get_inst_index(struct se_portal_group *se_tpg) lio_tpg_get_inst_index() argument
1965 struct iscsi_portal_group *tpg = se_tpg->se_tpg_fabric_ptr; lio_tpg_get_inst_index()
1974 struct se_portal_group *se_tpg = se_acl->se_tpg; lio_set_default_node_attributes() local
1975 struct iscsi_portal_group *tpg = container_of(se_tpg, lio_set_default_node_attributes()
216 lio_target_call_addnptotpg( struct se_portal_group *se_tpg, struct config_group *group, const char *name) lio_target_call_addnptotpg() argument
863 lio_tpg_alloc_fabric_acl( struct se_portal_group *se_tpg) lio_tpg_alloc_fabric_acl() argument
877 lio_target_make_nodeacl( struct se_portal_group *se_tpg, struct config_group *group, const char *name) lio_target_make_nodeacl() argument
1356 lio_target_tpg_show_enable( struct se_portal_group *se_tpg, char *page) lio_target_tpg_show_enable() argument
1372 lio_target_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) lio_target_tpg_store_enable() argument
1416 lio_target_tpg_show_dynamic_sessions( struct se_portal_group *se_tpg, char *page) lio_target_tpg_show_dynamic_sessions() argument
1870 lio_tpg_check_demo_mode_write_protect( struct se_portal_group *se_tpg) lio_tpg_check_demo_mode_write_protect() argument
1878 lio_tpg_check_prod_mode_write_protect( struct se_portal_group *se_tpg) lio_tpg_check_prod_mode_write_protect() argument
1886 lio_tpg_check_prot_fabric_only( struct se_portal_group *se_tpg) lio_tpg_check_prot_fabric_only() argument
1900 lio_tpg_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_acl) lio_tpg_release_fabric_acl() argument
H A Discsi_target_login.c166 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsi_check_for_session_reinstatement() local
181 spin_lock_bh(&se_tpg->session_lock); iscsi_check_for_session_reinstatement()
182 list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list, iscsi_check_for_session_reinstatement()
206 spin_unlock_bh(&se_tpg->session_lock); iscsi_check_for_session_reinstatement()
553 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsi_login_non_zero_tsih_s2() local
558 spin_lock_bh(&se_tpg->session_lock); iscsi_login_non_zero_tsih_s2()
559 list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list, iscsi_login_non_zero_tsih_s2()
575 spin_unlock_bh(&se_tpg->session_lock); iscsi_login_non_zero_tsih_s2()
758 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsi_post_login_handler() local
815 spin_lock_bh(&se_tpg->session_lock); iscsi_post_login_handler()
817 spin_unlock_bh(&se_tpg->session_lock); iscsi_post_login_handler()
829 spin_lock_bh(&se_tpg->session_lock); iscsi_post_login_handler()
859 spin_unlock_bh(&se_tpg->session_lock); iscsi_post_login_handler()
1222 struct se_portal_group *se_tpg = iscsi_target_login_sess_out() local
1227 spin_lock_bh(&se_tpg->session_lock); iscsi_target_login_sess_out()
1229 spin_unlock_bh(&se_tpg->session_lock); iscsi_target_login_sess_out()
H A Discsi_target_erl0.c756 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsit_handle_time2retain_timeout() local
758 spin_lock_bh(&se_tpg->session_lock); iscsit_handle_time2retain_timeout()
760 spin_unlock_bh(&se_tpg->session_lock); iscsit_handle_time2retain_timeout()
766 spin_unlock_bh(&se_tpg->session_lock); iscsit_handle_time2retain_timeout()
788 spin_unlock_bh(&se_tpg->session_lock); iscsit_handle_time2retain_timeout()
828 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsit_stop_time2retain_timer() local
837 spin_unlock(&se_tpg->session_lock); iscsit_stop_time2retain_timer()
841 spin_lock(&se_tpg->session_lock); iscsit_stop_time2retain_timer()
H A Discsi_target.c4491 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsit_close_session() local
4500 spin_lock_bh(&se_tpg->session_lock); iscsit_close_session()
4504 spin_unlock_bh(&se_tpg->session_lock); iscsit_close_session()
4539 spin_lock_bh(&se_tpg->session_lock); iscsit_close_session()
4557 spin_unlock_bh(&se_tpg->session_lock); iscsit_close_session()
4812 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; iscsit_release_sessions_for_tpg() local
4817 spin_lock_bh(&se_tpg->session_lock); iscsit_release_sessions_for_tpg()
4819 spin_unlock_bh(&se_tpg->session_lock); iscsit_release_sessions_for_tpg()
4823 list_for_each_entry_safe(se_sess, se_sess_tmp, &se_tpg->tpg_sess_list, iscsit_release_sessions_for_tpg()
4839 spin_unlock_bh(&se_tpg->session_lock); iscsit_release_sessions_for_tpg()
H A Discsi_target_stat.c724 struct se_wwn *wwn = acl->se_node_acl.se_tpg->se_tpg_wwn; iscsi_stat_sess_show_attr_inst()
H A Discsi_target_nego.c136 iscsi_tpg = container_of(se_nacl->se_tpg, iscsi_handle_authentication()
/linux-4.1.27/drivers/xen/
H A Dxen-scsiback.c181 struct se_portal_group se_tpg; member in struct:scsiback_tpg
606 transport_init_se_cmd(se_cmd, tpg->se_tpg.se_tpg_tfo, scsiback_device_action()
889 spin_lock(&tpg_entry->se_tpg.tpg_lun_lock); scsiback_add_translation_entry()
890 if (tpg_entry->se_tpg.tpg_lun_list[lun]->lun_status == scsiback_add_translation_entry()
897 spin_unlock(&tpg_entry->se_tpg.tpg_lun_lock); scsiback_add_translation_entry()
1257 static u8 scsiback_get_fabric_proto_ident(struct se_portal_group *se_tpg) scsiback_get_fabric_proto_ident() argument
1259 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_get_fabric_proto_ident()
1260 struct scsiback_tpg, se_tpg); scsiback_get_fabric_proto_ident()
1265 return sas_get_fabric_proto_ident(se_tpg); scsiback_get_fabric_proto_ident()
1267 return fc_get_fabric_proto_ident(se_tpg); scsiback_get_fabric_proto_ident()
1269 return iscsi_get_fabric_proto_ident(se_tpg); scsiback_get_fabric_proto_ident()
1276 return sas_get_fabric_proto_ident(se_tpg); scsiback_get_fabric_proto_ident()
1279 static char *scsiback_get_fabric_wwn(struct se_portal_group *se_tpg) scsiback_get_fabric_wwn() argument
1281 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_get_fabric_wwn()
1282 struct scsiback_tpg, se_tpg); scsiback_get_fabric_wwn()
1288 static u16 scsiback_get_tag(struct se_portal_group *se_tpg) scsiback_get_tag() argument
1290 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_get_tag()
1291 struct scsiback_tpg, se_tpg); scsiback_get_tag()
1295 static u32 scsiback_get_default_depth(struct se_portal_group *se_tpg) scsiback_get_default_depth() argument
1301 scsiback_get_pr_transport_id(struct se_portal_group *se_tpg, scsiback_get_pr_transport_id() argument
1307 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_get_pr_transport_id()
1308 struct scsiback_tpg, se_tpg); scsiback_get_pr_transport_id()
1313 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1316 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1319 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1327 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id()
1332 scsiback_get_pr_transport_id_len(struct se_portal_group *se_tpg, scsiback_get_pr_transport_id_len() argument
1337 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_get_pr_transport_id_len()
1338 struct scsiback_tpg, se_tpg); scsiback_get_pr_transport_id_len()
1343 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1346 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1349 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1357 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, scsiback_get_pr_transport_id_len()
1362 scsiback_parse_pr_out_transport_id(struct se_portal_group *se_tpg, scsiback_parse_pr_out_transport_id() argument
1367 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_parse_pr_out_transport_id()
1368 struct scsiback_tpg, se_tpg); scsiback_parse_pr_out_transport_id()
1373 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, scsiback_parse_pr_out_transport_id()
1376 return fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, scsiback_parse_pr_out_transport_id()
1379 return iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, scsiback_parse_pr_out_transport_id()
1387 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, scsiback_parse_pr_out_transport_id()
1458 scsiback_alloc_fabric_acl(struct se_portal_group *se_tpg) scsiback_alloc_fabric_acl() argument
1464 scsiback_release_fabric_acl(struct se_portal_group *se_tpg, scsiback_release_fabric_acl() argument
1470 static u32 scsiback_tpg_get_inst_index(struct se_portal_group *se_tpg) scsiback_tpg_get_inst_index() argument
1581 static ssize_t scsiback_tpg_param_show_alias(struct se_portal_group *se_tpg, scsiback_tpg_param_show_alias() argument
1584 struct scsiback_tpg *tpg = container_of(se_tpg, struct scsiback_tpg, scsiback_tpg_param_show_alias()
1585 se_tpg); scsiback_tpg_param_show_alias()
1595 static ssize_t scsiback_tpg_param_store_alias(struct se_portal_group *se_tpg, scsiback_tpg_param_store_alias() argument
1598 struct scsiback_tpg *tpg = container_of(se_tpg, struct scsiback_tpg, scsiback_tpg_param_store_alias()
1599 se_tpg); scsiback_tpg_param_store_alias()
1627 struct se_portal_group *se_tpg; scsiback_make_nexus() local
1637 se_tpg = &tpg->se_tpg; scsiback_make_nexus()
1660 se_tpg, (unsigned char *)name); scsiback_make_nexus()
1668 transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, scsiback_make_nexus()
1728 static ssize_t scsiback_tpg_show_nexus(struct se_portal_group *se_tpg, scsiback_tpg_show_nexus() argument
1731 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_tpg_show_nexus()
1732 struct scsiback_tpg, se_tpg); scsiback_tpg_show_nexus()
1749 static ssize_t scsiback_tpg_store_nexus(struct se_portal_group *se_tpg, scsiback_tpg_store_nexus() argument
1753 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_tpg_store_nexus()
1754 struct scsiback_tpg, se_tpg); scsiback_tpg_store_nexus()
1852 static int scsiback_port_link(struct se_portal_group *se_tpg, scsiback_port_link() argument
1855 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_port_link()
1856 struct scsiback_tpg, se_tpg); scsiback_port_link()
1865 static void scsiback_port_unlink(struct se_portal_group *se_tpg, scsiback_port_unlink() argument
1868 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_port_unlink()
1869 struct scsiback_tpg, se_tpg); scsiback_port_unlink()
1905 &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); scsiback_make_tpg()
1914 return &tpg->se_tpg; scsiback_make_tpg()
1917 static void scsiback_drop_tpg(struct se_portal_group *se_tpg) scsiback_drop_tpg() argument
1919 struct scsiback_tpg *tpg = container_of(se_tpg, scsiback_drop_tpg()
1920 struct scsiback_tpg, se_tpg); scsiback_drop_tpg()
1930 * Deregister the se_tpg from TCM. scsiback_drop_tpg()
1932 core_tpg_deregister(se_tpg); scsiback_drop_tpg()
1936 static int scsiback_check_true(struct se_portal_group *se_tpg) scsiback_check_true() argument
1941 static int scsiback_check_false(struct se_portal_group *se_tpg) scsiback_check_false() argument
/linux-4.1.27/drivers/scsi/qla2xxx/
H A Dtcm_qla2xxx.c193 static u8 tcm_qla2xxx_get_fabric_proto_ident(struct se_portal_group *se_tpg) tcm_qla2xxx_get_fabric_proto_ident() argument
195 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_get_fabric_proto_ident()
196 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_get_fabric_proto_ident()
203 proto_id = fc_get_fabric_proto_ident(se_tpg); tcm_qla2xxx_get_fabric_proto_ident()
210 static char *tcm_qla2xxx_get_fabric_wwn(struct se_portal_group *se_tpg) tcm_qla2xxx_get_fabric_wwn() argument
212 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_get_fabric_wwn()
213 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_get_fabric_wwn()
219 static u16 tcm_qla2xxx_get_tag(struct se_portal_group *se_tpg) tcm_qla2xxx_get_tag() argument
221 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_get_tag()
222 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_get_tag()
226 static u32 tcm_qla2xxx_get_default_depth(struct se_portal_group *se_tpg) tcm_qla2xxx_get_default_depth() argument
232 struct se_portal_group *se_tpg, tcm_qla2xxx_get_pr_transport_id()
238 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_get_pr_transport_id()
239 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_get_pr_transport_id()
246 ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, tcm_qla2xxx_get_pr_transport_id()
255 struct se_portal_group *se_tpg, tcm_qla2xxx_get_pr_transport_id_len()
260 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_get_pr_transport_id_len()
261 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_get_pr_transport_id_len()
268 ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, tcm_qla2xxx_get_pr_transport_id_len()
277 struct se_portal_group *se_tpg, tcm_qla2xxx_parse_pr_out_transport_id()
282 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_parse_pr_out_transport_id()
283 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_parse_pr_out_transport_id()
290 tid = fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, tcm_qla2xxx_parse_pr_out_transport_id()
298 static int tcm_qla2xxx_check_demo_mode(struct se_portal_group *se_tpg) tcm_qla2xxx_check_demo_mode() argument
300 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_demo_mode()
301 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_demo_mode()
306 static int tcm_qla2xxx_check_demo_mode_cache(struct se_portal_group *se_tpg) tcm_qla2xxx_check_demo_mode_cache() argument
308 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_demo_mode_cache()
309 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_demo_mode_cache()
314 static int tcm_qla2xxx_check_demo_write_protect(struct se_portal_group *se_tpg) tcm_qla2xxx_check_demo_write_protect() argument
316 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_demo_write_protect()
317 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_demo_write_protect()
322 static int tcm_qla2xxx_check_prod_write_protect(struct se_portal_group *se_tpg) tcm_qla2xxx_check_prod_write_protect() argument
324 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_prod_write_protect()
325 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_prod_write_protect()
330 static int tcm_qla2xxx_check_demo_mode_login_only(struct se_portal_group *se_tpg) tcm_qla2xxx_check_demo_mode_login_only() argument
332 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_demo_mode_login_only()
333 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_demo_mode_login_only()
338 static int tcm_qla2xxx_check_prot_fabric_only(struct se_portal_group *se_tpg) tcm_qla2xxx_check_prot_fabric_only() argument
340 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_check_prot_fabric_only()
341 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_check_prot_fabric_only()
347 struct se_portal_group *se_tpg) tcm_qla2xxx_alloc_fabric_acl()
361 struct se_portal_group *se_tpg, tcm_qla2xxx_release_fabric_acl()
369 static u32 tcm_qla2xxx_tpg_get_inst_index(struct se_portal_group *se_tpg) tcm_qla2xxx_tpg_get_inst_index() argument
371 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_tpg_get_inst_index()
372 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_tpg_get_inst_index()
776 struct se_portal_group *se_tpg = se_nacl->se_tpg; tcm_qla2xxx_clear_nacl_from_fcport_map() local
777 struct se_wwn *se_wwn = se_tpg->se_tpg_wwn; tcm_qla2xxx_clear_nacl_from_fcport_map()
847 struct se_portal_group *se_tpg, tcm_qla2xxx_make_nodeacl()
859 se_nacl_new = tcm_qla2xxx_alloc_fabric_acl(se_tpg); tcm_qla2xxx_make_nodeacl()
869 se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new, tcm_qla2xxx_make_nodeacl()
872 tcm_qla2xxx_release_fabric_acl(se_tpg, se_nacl_new); tcm_qla2xxx_make_nodeacl()
887 struct se_portal_group *se_tpg = se_acl->se_tpg; tcm_qla2xxx_drop_nodeacl() local
891 core_tpg_del_initiator_node_acl(se_tpg, se_acl, 1); tcm_qla2xxx_drop_nodeacl()
900 struct se_portal_group *se_tpg, \
903 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \
904 struct tcm_qla2xxx_tpg, se_tpg); \
910 struct se_portal_group *se_tpg, \
914 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \
915 struct tcm_qla2xxx_tpg, se_tpg); \
997 struct se_portal_group *se_tpg, tcm_qla2xxx_tpg_show_enable()
1000 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_tpg_show_enable()
1001 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_tpg_show_enable()
1011 struct se_portal_group *se_tpg = &base_tpg->se_tpg; tcm_qla2xxx_depend_tpg() local
1014 if (!target_depend_item(&se_tpg->tpg_group.cg_item)) { tcm_qla2xxx_depend_tpg()
1025 struct se_portal_group *se_tpg = &base_tpg->se_tpg; tcm_qla2xxx_undepend_tpg() local
1030 target_undepend_item(&se_tpg->tpg_group.cg_item); tcm_qla2xxx_undepend_tpg()
1036 struct se_portal_group *se_tpg, tcm_qla2xxx_tpg_store_enable()
1040 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_tpg_store_enable()
1041 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_tpg_store_enable()
1082 struct se_portal_group *se_tpg, tcm_qla2xxx_tpg_show_dynamic_sessions()
1085 return target_show_dynamic_sessions(se_tpg, page); tcm_qla2xxx_tpg_show_dynamic_sessions()
1091 struct se_portal_group *se_tpg, tcm_qla2xxx_tpg_store_fabric_prot_type()
1095 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_tpg_store_fabric_prot_type()
1096 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_tpg_store_fabric_prot_type()
1114 struct se_portal_group *se_tpg, tcm_qla2xxx_tpg_show_fabric_prot_type()
1117 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_tpg_show_fabric_prot_type()
1118 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_tpg_show_fabric_prot_type()
1169 &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); tcm_qla2xxx_make_tpg()
1177 return &tpg->se_tpg; tcm_qla2xxx_make_tpg()
1180 static void tcm_qla2xxx_drop_tpg(struct se_portal_group *se_tpg) tcm_qla2xxx_drop_tpg() argument
1182 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_drop_tpg()
1183 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_drop_tpg()
1193 core_tpg_deregister(se_tpg); tcm_qla2xxx_drop_tpg()
1202 struct se_portal_group *se_tpg, tcm_qla2xxx_npiv_tpg_show_enable()
1205 return tcm_qla2xxx_tpg_show_enable(se_tpg, page); tcm_qla2xxx_npiv_tpg_show_enable()
1209 struct se_portal_group *se_tpg, tcm_qla2xxx_npiv_tpg_store_enable()
1213 struct se_wwn *se_wwn = se_tpg->se_tpg_wwn; tcm_qla2xxx_npiv_tpg_store_enable()
1217 struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, tcm_qla2xxx_npiv_tpg_store_enable()
1218 struct tcm_qla2xxx_tpg, se_tpg); tcm_qla2xxx_npiv_tpg_store_enable()
1289 &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); tcm_qla2xxx_npiv_make_tpg()
1295 return &tpg->se_tpg; tcm_qla2xxx_npiv_make_tpg()
1573 struct se_portal_group *se_tpg; tcm_qla2xxx_check_initiator_node_acl() local
1596 se_tpg = &tpg->se_tpg; tcm_qla2xxx_check_initiator_node_acl()
1615 se_sess->se_node_acl = core_tpg_check_initiator_node_acl(se_tpg, tcm_qla2xxx_check_initiator_node_acl()
1636 transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess); tcm_qla2xxx_check_initiator_node_acl()
231 tcm_qla2xxx_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) tcm_qla2xxx_get_pr_transport_id() argument
254 tcm_qla2xxx_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) tcm_qla2xxx_get_pr_transport_id_len() argument
276 tcm_qla2xxx_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) tcm_qla2xxx_parse_pr_out_transport_id() argument
346 tcm_qla2xxx_alloc_fabric_acl( struct se_portal_group *se_tpg) tcm_qla2xxx_alloc_fabric_acl() argument
360 tcm_qla2xxx_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) tcm_qla2xxx_release_fabric_acl() argument
846 tcm_qla2xxx_make_nodeacl( struct se_portal_group *se_tpg, struct config_group *group, const char *name) tcm_qla2xxx_make_nodeacl() argument
996 tcm_qla2xxx_tpg_show_enable( struct se_portal_group *se_tpg, char *page) tcm_qla2xxx_tpg_show_enable() argument
1035 tcm_qla2xxx_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_qla2xxx_tpg_store_enable() argument
1081 tcm_qla2xxx_tpg_show_dynamic_sessions( struct se_portal_group *se_tpg, char *page) tcm_qla2xxx_tpg_show_dynamic_sessions() argument
1090 tcm_qla2xxx_tpg_store_fabric_prot_type( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_qla2xxx_tpg_store_fabric_prot_type() argument
1113 tcm_qla2xxx_tpg_show_fabric_prot_type( struct se_portal_group *se_tpg, char *page) tcm_qla2xxx_tpg_show_fabric_prot_type() argument
1201 tcm_qla2xxx_npiv_tpg_show_enable( struct se_portal_group *se_tpg, char *page) tcm_qla2xxx_npiv_tpg_show_enable() argument
1208 tcm_qla2xxx_npiv_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_qla2xxx_npiv_tpg_store_enable() argument
H A Dtcm_qla2xxx.h49 struct se_portal_group se_tpg; member in struct:tcm_qla2xxx_tpg
/linux-4.1.27/drivers/target/sbp/
H A Dsbp_target.c100 spin_lock_bh(&tpg->se_tpg.session_lock); sbp_session_find_by_guid()
101 list_for_each_entry(se_sess, &tpg->se_tpg.tpg_sess_list, sess_list) { sbp_session_find_by_guid()
106 spin_unlock_bh(&tpg->se_tpg.session_lock); sbp_session_find_by_guid()
136 spin_lock_bh(&tpg->se_tpg.session_lock); sbp_login_count_all_by_lun()
137 list_for_each_entry(se_sess, &tpg->se_tpg.tpg_sess_list, sess_list) { sbp_login_count_all_by_lun()
150 spin_unlock_bh(&tpg->se_tpg.session_lock); sbp_login_count_all_by_lun()
162 spin_lock_bh(&tpg->se_tpg.session_lock); sbp_login_find_by_id()
163 list_for_each_entry(se_sess, &tpg->se_tpg.tpg_sess_list, sess_list) { sbp_login_find_by_id()
173 spin_unlock_bh(&tpg->se_tpg.session_lock); sbp_login_find_by_id()
180 struct se_portal_group *se_tpg = &tpg->se_tpg; sbp_get_lun_from_tpg() local
186 spin_lock(&se_tpg->tpg_lun_lock); sbp_get_lun_from_tpg()
187 se_lun = se_tpg->tpg_lun_list[lun]; sbp_get_lun_from_tpg()
192 spin_unlock(&se_tpg->tpg_lun_lock); sbp_get_lun_from_tpg()
223 se_nacl = core_tpg_check_initiator_node_acl(&tpg->se_tpg, guid_str); sbp_session_create()
241 transport_register_session(&tpg->se_tpg, se_nacl, sess->se_sess, sess); sbp_session_create()
1681 static int sbp_check_true(struct se_portal_group *se_tpg) sbp_check_true() argument
1686 static int sbp_check_false(struct se_portal_group *se_tpg) sbp_check_false() argument
1696 static char *sbp_get_fabric_wwn(struct se_portal_group *se_tpg) sbp_get_fabric_wwn() argument
1698 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_get_fabric_wwn()
1704 static u16 sbp_get_tag(struct se_portal_group *se_tpg) sbp_get_tag() argument
1706 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_get_tag()
1710 static u32 sbp_get_default_depth(struct se_portal_group *se_tpg) sbp_get_default_depth() argument
1715 static struct se_node_acl *sbp_alloc_fabric_acl(struct se_portal_group *se_tpg) sbp_alloc_fabric_acl() argument
1729 struct se_portal_group *se_tpg, sbp_release_fabric_acl()
1737 static u32 sbp_tpg_get_inst_index(struct se_portal_group *se_tpg) sbp_tpg_get_inst_index() argument
1865 static u8 sbp_get_fabric_proto_ident(struct se_portal_group *se_tpg) sbp_get_fabric_proto_ident() argument
1875 struct se_portal_group *se_tpg, sbp_get_pr_transport_id()
1902 struct se_portal_group *se_tpg, sbp_get_pr_transport_id_len()
1922 struct se_portal_group *se_tpg, sbp_parse_pr_out_transport_id()
1973 num_luns = sbp_count_se_tpg_luns(&tport->tpg->se_tpg); sbp_update_unit_directory()
2023 spin_lock(&tport->tpg->se_tpg.tpg_lun_lock); sbp_update_unit_directory()
2025 struct se_lun *se_lun = tport->tpg->se_tpg.tpg_lun_list[i]; sbp_update_unit_directory()
2032 spin_unlock(&tport->tpg->se_tpg.tpg_lun_lock); sbp_update_unit_directory()
2042 spin_lock(&tport->tpg->se_tpg.tpg_lun_lock); sbp_update_unit_directory()
2044 spin_unlock(&tport->tpg->se_tpg.tpg_lun_lock); sbp_update_unit_directory()
2104 struct se_portal_group *se_tpg, sbp_make_nodeacl()
2116 se_nacl_new = sbp_alloc_fabric_acl(se_tpg); sbp_make_nodeacl()
2124 se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new, sbp_make_nodeacl()
2127 sbp_release_fabric_acl(se_tpg, se_nacl_new); sbp_make_nodeacl()
2143 core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); sbp_drop_nodeacl()
2148 struct se_portal_group *se_tpg, sbp_post_link_lun()
2151 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_post_link_lun()
2157 struct se_portal_group *se_tpg, sbp_pre_unlink_lun()
2160 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_pre_unlink_lun()
2164 if (sbp_count_se_tpg_luns(&tpg->se_tpg) == 0) sbp_pre_unlink_lun()
2217 ret = core_tpg_register(&sbp_ops, wwn, &tpg->se_tpg, tpg, sbp_make_tpg()
2222 return &tpg->se_tpg; sbp_make_tpg()
2232 static void sbp_drop_tpg(struct se_portal_group *se_tpg) sbp_drop_tpg() argument
2234 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_drop_tpg()
2237 core_tpg_deregister(se_tpg); sbp_drop_tpg()
2289 struct se_portal_group *se_tpg, sbp_tpg_show_directory_id()
2292 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_show_directory_id()
2302 struct se_portal_group *se_tpg, sbp_tpg_store_directory_id()
2306 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_store_directory_id()
2330 struct se_portal_group *se_tpg, sbp_tpg_show_enable()
2333 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_show_enable()
2339 struct se_portal_group *se_tpg, sbp_tpg_store_enable()
2343 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_store_enable()
2357 if (sbp_count_se_tpg_luns(&tpg->se_tpg) == 0) { sbp_tpg_store_enable()
2363 spin_lock_bh(&se_tpg->session_lock); sbp_tpg_store_enable()
2364 if (!list_empty(&se_tpg->tpg_sess_list)) { sbp_tpg_store_enable()
2365 spin_unlock_bh(&se_tpg->session_lock); sbp_tpg_store_enable()
2368 spin_unlock_bh(&se_tpg->session_lock); sbp_tpg_store_enable()
2392 struct se_portal_group *se_tpg, sbp_tpg_attrib_show_mgt_orb_timeout()
2395 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_show_mgt_orb_timeout()
2401 struct se_portal_group *se_tpg, sbp_tpg_attrib_store_mgt_orb_timeout()
2405 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_store_mgt_orb_timeout()
2428 struct se_portal_group *se_tpg, sbp_tpg_attrib_show_max_reconnect_timeout()
2431 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_show_max_reconnect_timeout()
2437 struct se_portal_group *se_tpg, sbp_tpg_attrib_store_max_reconnect_timeout()
2441 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_store_max_reconnect_timeout()
2464 struct se_portal_group *se_tpg, sbp_tpg_attrib_show_max_logins_per_lun()
2467 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_show_max_logins_per_lun()
2473 struct se_portal_group *se_tpg, sbp_tpg_attrib_store_max_logins_per_lun()
2477 struct sbp_tpg *tpg = container_of(se_tpg, struct sbp_tpg, se_tpg); sbp_tpg_attrib_store_max_logins_per_lun()
1728 sbp_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) sbp_release_fabric_acl() argument
1874 sbp_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) sbp_get_pr_transport_id() argument
1901 sbp_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) sbp_get_pr_transport_id_len() argument
1921 sbp_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) sbp_parse_pr_out_transport_id() argument
2103 sbp_make_nodeacl( struct se_portal_group *se_tpg, struct config_group *group, const char *name) sbp_make_nodeacl() argument
2147 sbp_post_link_lun( struct se_portal_group *se_tpg, struct se_lun *se_lun) sbp_post_link_lun() argument
2156 sbp_pre_unlink_lun( struct se_portal_group *se_tpg, struct se_lun *se_lun) sbp_pre_unlink_lun() argument
2288 sbp_tpg_show_directory_id( struct se_portal_group *se_tpg, char *page) sbp_tpg_show_directory_id() argument
2301 sbp_tpg_store_directory_id( struct se_portal_group *se_tpg, const char *page, size_t count) sbp_tpg_store_directory_id() argument
2329 sbp_tpg_show_enable( struct se_portal_group *se_tpg, char *page) sbp_tpg_show_enable() argument
2338 sbp_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) sbp_tpg_store_enable() argument
2391 sbp_tpg_attrib_show_mgt_orb_timeout( struct se_portal_group *se_tpg, char *page) sbp_tpg_attrib_show_mgt_orb_timeout() argument
2400 sbp_tpg_attrib_store_mgt_orb_timeout( struct se_portal_group *se_tpg, const char *page, size_t count) sbp_tpg_attrib_store_mgt_orb_timeout() argument
2427 sbp_tpg_attrib_show_max_reconnect_timeout( struct se_portal_group *se_tpg, char *page) sbp_tpg_attrib_show_max_reconnect_timeout() argument
2436 sbp_tpg_attrib_store_max_reconnect_timeout( struct se_portal_group *se_tpg, const char *page, size_t count) sbp_tpg_attrib_store_max_reconnect_timeout() argument
2463 sbp_tpg_attrib_show_max_logins_per_lun( struct se_portal_group *se_tpg, char *page) sbp_tpg_attrib_show_max_logins_per_lun() argument
2472 sbp_tpg_attrib_store_max_logins_per_lun( struct se_portal_group *se_tpg, const char *page, size_t count) sbp_tpg_attrib_store_max_logins_per_lun() argument
H A Dsbp_target.h169 struct se_portal_group se_tpg; member in struct:sbp_tpg
/linux-4.1.27/drivers/vhost/
H A Dscsi.c145 struct se_portal_group se_tpg; member in struct:vhost_scsi_tpg
285 static int vhost_scsi_check_true(struct se_portal_group *se_tpg) vhost_scsi_check_true() argument
290 static int vhost_scsi_check_false(struct se_portal_group *se_tpg) vhost_scsi_check_false() argument
300 static u8 vhost_scsi_get_fabric_proto_ident(struct se_portal_group *se_tpg) vhost_scsi_get_fabric_proto_ident() argument
302 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_get_fabric_proto_ident()
303 struct vhost_scsi_tpg, se_tpg); vhost_scsi_get_fabric_proto_ident()
308 return sas_get_fabric_proto_ident(se_tpg); vhost_scsi_get_fabric_proto_ident()
310 return fc_get_fabric_proto_ident(se_tpg); vhost_scsi_get_fabric_proto_ident()
312 return iscsi_get_fabric_proto_ident(se_tpg); vhost_scsi_get_fabric_proto_ident()
319 return sas_get_fabric_proto_ident(se_tpg); vhost_scsi_get_fabric_proto_ident()
322 static char *vhost_scsi_get_fabric_wwn(struct se_portal_group *se_tpg) vhost_scsi_get_fabric_wwn() argument
324 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_get_fabric_wwn()
325 struct vhost_scsi_tpg, se_tpg); vhost_scsi_get_fabric_wwn()
331 static u16 vhost_scsi_get_tpgt(struct se_portal_group *se_tpg) vhost_scsi_get_tpgt() argument
333 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_get_tpgt()
334 struct vhost_scsi_tpg, se_tpg); vhost_scsi_get_tpgt()
338 static u32 vhost_scsi_get_default_depth(struct se_portal_group *se_tpg) vhost_scsi_get_default_depth() argument
344 vhost_scsi_get_pr_transport_id(struct se_portal_group *se_tpg, vhost_scsi_get_pr_transport_id() argument
350 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_get_pr_transport_id()
351 struct vhost_scsi_tpg, se_tpg); vhost_scsi_get_pr_transport_id()
356 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
359 return fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
362 return iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
370 return sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id()
375 vhost_scsi_get_pr_transport_id_len(struct se_portal_group *se_tpg, vhost_scsi_get_pr_transport_id_len() argument
380 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_get_pr_transport_id_len()
381 struct vhost_scsi_tpg, se_tpg); vhost_scsi_get_pr_transport_id_len()
386 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
389 return fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
392 return iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
400 return sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, vhost_scsi_get_pr_transport_id_len()
405 vhost_scsi_parse_pr_out_transport_id(struct se_portal_group *se_tpg, vhost_scsi_parse_pr_out_transport_id() argument
410 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_parse_pr_out_transport_id()
411 struct vhost_scsi_tpg, se_tpg); vhost_scsi_parse_pr_out_transport_id()
416 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, vhost_scsi_parse_pr_out_transport_id()
419 return fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, vhost_scsi_parse_pr_out_transport_id()
422 return iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, vhost_scsi_parse_pr_out_transport_id()
430 return sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, vhost_scsi_parse_pr_out_transport_id()
434 static int vhost_scsi_check_prot_fabric_only(struct se_portal_group *se_tpg) vhost_scsi_check_prot_fabric_only() argument
436 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_check_prot_fabric_only()
437 struct vhost_scsi_tpg, se_tpg); vhost_scsi_check_prot_fabric_only()
443 vhost_scsi_alloc_fabric_acl(struct se_portal_group *se_tpg) vhost_scsi_alloc_fabric_acl() argument
457 vhost_scsi_release_fabric_acl(struct se_portal_group *se_tpg, vhost_scsi_release_fabric_acl() argument
465 static u32 vhost_scsi_tpg_get_inst_index(struct se_portal_group *se_tpg) vhost_scsi_tpg_get_inst_index() argument
1357 struct se_portal_group *se_tpg; vhost_scsi_set_endpoint() local
1408 * go ahead and take an explicit se_tpg->tpg_group.cg_item vhost_scsi_set_endpoint()
1411 se_tpg = &tpg->se_tpg; vhost_scsi_set_endpoint()
1412 ret = target_depend_item(&se_tpg->tpg_group.cg_item); vhost_scsi_set_endpoint()
1461 struct se_portal_group *se_tpg; vhost_scsi_clear_endpoint() local
1511 * Release se_tpg->tpg_group.cg_item configfs dependency now vhost_scsi_clear_endpoint()
1512 * to allow vhost-scsi WWPN se_tpg->tpg_group shutdown to occur. vhost_scsi_clear_endpoint()
1514 se_tpg = &tpg->se_tpg; vhost_scsi_clear_endpoint()
1515 target_undepend_item(&se_tpg->tpg_group.cg_item); vhost_scsi_clear_endpoint()
1789 static int vhost_scsi_port_link(struct se_portal_group *se_tpg, vhost_scsi_port_link() argument
1792 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_port_link()
1793 struct vhost_scsi_tpg, se_tpg); vhost_scsi_port_link()
1808 static void vhost_scsi_port_unlink(struct se_portal_group *se_tpg, vhost_scsi_port_unlink() argument
1811 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_port_unlink()
1812 struct vhost_scsi_tpg, se_tpg); vhost_scsi_port_unlink()
1826 vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, vhost_scsi_make_nodeacl() argument
1837 se_nacl_new = vhost_scsi_alloc_fabric_acl(se_tpg); vhost_scsi_make_nodeacl()
1846 se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new, vhost_scsi_make_nodeacl()
1849 vhost_scsi_release_fabric_acl(se_tpg, se_nacl_new); vhost_scsi_make_nodeacl()
1865 core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); vhost_scsi_drop_nodeacl()
1888 struct se_portal_group *se_tpg, vhost_scsi_tpg_attrib_store_fabric_prot_type()
1892 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_tpg_attrib_store_fabric_prot_type()
1893 struct vhost_scsi_tpg, se_tpg); vhost_scsi_tpg_attrib_store_fabric_prot_type()
1911 struct se_portal_group *se_tpg, vhost_scsi_tpg_attrib_show_fabric_prot_type()
1914 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_tpg_attrib_show_fabric_prot_type()
1915 struct vhost_scsi_tpg, se_tpg); vhost_scsi_tpg_attrib_show_fabric_prot_type()
1929 struct se_portal_group *se_tpg; vhost_scsi_make_nexus() local
1941 se_tpg = &tpg->se_tpg; vhost_scsi_make_nexus()
1996 se_tpg, (unsigned char *)name); vhost_scsi_make_nexus()
2006 transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, vhost_scsi_make_nexus()
2070 static ssize_t vhost_scsi_tpg_show_nexus(struct se_portal_group *se_tpg, vhost_scsi_tpg_show_nexus() argument
2073 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_tpg_show_nexus()
2074 struct vhost_scsi_tpg, se_tpg); vhost_scsi_tpg_show_nexus()
2091 static ssize_t vhost_scsi_tpg_store_nexus(struct se_portal_group *se_tpg, vhost_scsi_tpg_store_nexus() argument
2095 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_tpg_store_nexus()
2096 struct vhost_scsi_tpg, se_tpg); vhost_scsi_tpg_store_nexus()
2204 &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); vhost_scsi_make_tpg()
2213 return &tpg->se_tpg; vhost_scsi_make_tpg()
2216 static void vhost_scsi_drop_tpg(struct se_portal_group *se_tpg) vhost_scsi_drop_tpg() argument
2218 struct vhost_scsi_tpg *tpg = container_of(se_tpg, vhost_scsi_drop_tpg()
2219 struct vhost_scsi_tpg, se_tpg); vhost_scsi_drop_tpg()
2229 * Deregister the se_tpg from TCM.. vhost_scsi_drop_tpg()
2231 core_tpg_deregister(se_tpg); vhost_scsi_drop_tpg()
1887 vhost_scsi_tpg_attrib_store_fabric_prot_type( struct se_portal_group *se_tpg, const char *page, size_t count) vhost_scsi_tpg_attrib_store_fabric_prot_type() argument
1910 vhost_scsi_tpg_attrib_show_fabric_prot_type( struct se_portal_group *se_tpg, char *page) vhost_scsi_tpg_attrib_show_fabric_prot_type() argument
/linux-4.1.27/Documentation/target/
H A Dtcm_mod_builder.py68 buf += " struct se_portal_group se_tpg;\n"
122 buf += " struct se_portal_group se_tpg;\n"
173 buf += " struct se_portal_group se_tpg;\n"
243 buf += " struct se_portal_group *se_tpg,\n"
256 buf += " se_nacl_new = " + fabric_mod_name + "_alloc_fabric_acl(se_tpg);\n"
265 buf += " se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new,\n"
268 buf += " " + fabric_mod_name + "_release_fabric_acl(se_tpg, se_nacl_new);\n"
286 buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n"
312 buf += " &tpg->se_tpg, tpg,\n"
318 buf += " return &tpg->se_tpg;\n"
320 buf += "static void " + fabric_mod_name + "_drop_tpg(struct se_portal_group *se_tpg)\n"
322 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
323 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n\n"
324 buf += " core_tpg_deregister(se_tpg);\n"
517 buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n"
523 buf += "int " + fabric_mod_name + "_check_false(struct se_portal_group *se_tpg)\n"
546 buf += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *se_tpg)\n"
548 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
549 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
556 buf += " proto_id = fc_get_fabric_proto_ident(se_tpg);\n"
561 buf += " proto_id = sas_get_fabric_proto_ident(se_tpg);\n"
566 buf += " proto_id = iscsi_get_fabric_proto_ident(se_tpg);\n"
575 buf += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *se_tpg)\n"
577 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
578 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
585 buf += "u16 " + fabric_mod_name + "_get_tag(struct se_portal_group *se_tpg)\n"
587 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
588 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
594 buf += "u32 " + fabric_mod_name + "_get_default_depth(struct se_portal_group *se_tpg)\n"
602 buf += " struct se_portal_group *se_tpg,\n"
608 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
609 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
616 buf += " ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
622 buf += " ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
628 buf += " ret = iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
641 buf += " struct se_portal_group *se_tpg,\n"
646 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
647 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
654 buf += " ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
660 buf += " ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
666 buf += " ret = iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
680 buf += " struct se_portal_group *se_tpg,\n"
685 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
686 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
693 buf += " tid = fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
698 buf += " tid = sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
703 buf += " tid = iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
713 buf += "struct se_node_acl *" + fabric_mod_name + "_alloc_fabric_acl(struct se_portal_group *se_tpg)\n"
727 buf += " struct se_portal_group *se_tpg,\n"
738 buf += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *se_tpg)\n"
/linux-4.1.27/drivers/usb/gadget/legacy/
H A Dtcm_usb_gadget.c1062 tv_nexus->tvn_se_sess->se_tpg->se_tpg_tfo, usbg_cmd_work()
1178 tv_nexus->tvn_se_sess->se_tpg->se_tpg_tfo, bot_cmd_work()
1262 static int usbg_check_true(struct se_portal_group *se_tpg) usbg_check_true() argument
1267 static int usbg_check_false(struct se_portal_group *se_tpg) usbg_check_false() argument
1277 static u8 usbg_get_fabric_proto_ident(struct se_portal_group *se_tpg) usbg_get_fabric_proto_ident() argument
1279 struct usbg_tpg *tpg = container_of(se_tpg, usbg_get_fabric_proto_ident()
1280 struct usbg_tpg, se_tpg); usbg_get_fabric_proto_ident()
1287 proto_id = sas_get_fabric_proto_ident(se_tpg); usbg_get_fabric_proto_ident()
1294 static char *usbg_get_fabric_wwn(struct se_portal_group *se_tpg) usbg_get_fabric_wwn() argument
1296 struct usbg_tpg *tpg = container_of(se_tpg, usbg_get_fabric_wwn()
1297 struct usbg_tpg, se_tpg); usbg_get_fabric_wwn()
1303 static u16 usbg_get_tag(struct se_portal_group *se_tpg) usbg_get_tag() argument
1305 struct usbg_tpg *tpg = container_of(se_tpg, usbg_get_tag()
1306 struct usbg_tpg, se_tpg); usbg_get_tag()
1310 static u32 usbg_get_default_depth(struct se_portal_group *se_tpg) usbg_get_default_depth() argument
1316 struct se_portal_group *se_tpg, usbg_get_pr_transport_id()
1322 struct usbg_tpg *tpg = container_of(se_tpg, usbg_get_pr_transport_id()
1323 struct usbg_tpg, se_tpg); usbg_get_pr_transport_id()
1330 ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg, usbg_get_pr_transport_id()
1339 struct se_portal_group *se_tpg, usbg_get_pr_transport_id_len()
1344 struct usbg_tpg *tpg = container_of(se_tpg, usbg_get_pr_transport_id_len()
1345 struct usbg_tpg, se_tpg); usbg_get_pr_transport_id_len()
1352 ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg, usbg_get_pr_transport_id_len()
1361 struct se_portal_group *se_tpg, usbg_parse_pr_out_transport_id()
1366 struct usbg_tpg *tpg = container_of(se_tpg, usbg_parse_pr_out_transport_id()
1367 struct usbg_tpg, se_tpg); usbg_parse_pr_out_transport_id()
1374 tid = sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len, usbg_parse_pr_out_transport_id()
1381 static struct se_node_acl *usbg_alloc_fabric_acl(struct se_portal_group *se_tpg) usbg_alloc_fabric_acl() argument
1393 struct se_portal_group *se_tpg, usbg_release_fabric_acl()
1401 static u32 usbg_tpg_get_inst_index(struct se_portal_group *se_tpg) usbg_tpg_get_inst_index() argument
1493 struct se_portal_group *se_tpg, usbg_make_nodeacl()
1506 se_nacl_new = usbg_alloc_fabric_acl(se_tpg); usbg_make_nodeacl()
1515 se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new, usbg_make_nodeacl()
1518 usbg_release_fabric_acl(se_tpg, se_nacl_new); usbg_make_nodeacl()
1534 core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1); usbg_drop_nodeacl()
1575 ret = core_tpg_register(&usbg_ops, wwn, &tpg->se_tpg, tpg, usbg_make_tpg()
1583 return &tpg->se_tpg; usbg_make_tpg()
1586 static void usbg_drop_tpg(struct se_portal_group *se_tpg) usbg_drop_tpg() argument
1588 struct usbg_tpg *tpg = container_of(se_tpg, usbg_drop_tpg()
1589 struct usbg_tpg, se_tpg); usbg_drop_tpg()
1591 core_tpg_deregister(se_tpg); usbg_drop_tpg()
1642 struct se_portal_group *se_tpg, tcm_usbg_tpg_show_enable()
1645 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); tcm_usbg_tpg_show_enable()
1654 struct se_portal_group *se_tpg, tcm_usbg_tpg_store_enable()
1658 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); tcm_usbg_tpg_store_enable()
1687 struct se_portal_group *se_tpg, tcm_usbg_tpg_show_nexus()
1690 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); tcm_usbg_tpg_show_nexus()
1709 struct se_portal_group *se_tpg; tcm_usbg_make_nexus() local
1719 se_tpg = &tpg->se_tpg; tcm_usbg_make_nexus()
1735 se_tpg, name); tcm_usbg_make_nexus()
1744 transport_register_session(se_tpg, tv_nexus->tvn_se_sess->se_node_acl, tcm_usbg_make_nexus()
1798 struct se_portal_group *se_tpg, tcm_usbg_tpg_store_nexus()
1802 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); tcm_usbg_tpg_store_nexus()
1839 static int usbg_port_link(struct se_portal_group *se_tpg, struct se_lun *lun) usbg_port_link() argument
1841 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); usbg_port_link()
1848 static void usbg_port_unlink(struct se_portal_group *se_tpg, usbg_port_unlink() argument
1851 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); usbg_port_unlink()
1315 usbg_get_pr_transport_id( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code, unsigned char *buf) usbg_get_pr_transport_id() argument
1338 usbg_get_pr_transport_id_len( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) usbg_get_pr_transport_id_len() argument
1360 usbg_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) usbg_parse_pr_out_transport_id() argument
1392 usbg_release_fabric_acl( struct se_portal_group *se_tpg, struct se_node_acl *se_nacl) usbg_release_fabric_acl() argument
1492 usbg_make_nodeacl( struct se_portal_group *se_tpg, struct config_group *group, const char *name) usbg_make_nodeacl() argument
1641 tcm_usbg_tpg_show_enable( struct se_portal_group *se_tpg, char *page) tcm_usbg_tpg_show_enable() argument
1653 tcm_usbg_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_usbg_tpg_store_enable() argument
1686 tcm_usbg_tpg_show_nexus( struct se_portal_group *se_tpg, char *page) tcm_usbg_tpg_show_nexus() argument
1797 tcm_usbg_tpg_store_nexus( struct se_portal_group *se_tpg, const char *page, size_t count) tcm_usbg_tpg_store_nexus() argument
H A Dtcm_usb_gadget.h49 struct se_portal_group se_tpg; member in struct:usbg_tpg
/linux-4.1.27/drivers/infiniband/ulp/srpt/
H A Dib_srpt.c3325 static int srpt_check_true(struct se_portal_group *se_tpg) srpt_check_true() argument
3330 static int srpt_check_false(struct se_portal_group *se_tpg) srpt_check_false() argument
3340 static u8 srpt_get_fabric_proto_ident(struct se_portal_group *se_tpg) srpt_get_fabric_proto_ident() argument
3357 static u32 srpt_get_default_depth(struct se_portal_group *se_tpg) srpt_get_default_depth() argument
3362 static u32 srpt_get_pr_transport_id(struct se_portal_group *se_tpg, srpt_get_pr_transport_id() argument
3377 static u32 srpt_get_pr_transport_id_len(struct se_portal_group *se_tpg, srpt_get_pr_transport_id_len() argument
3386 static char *srpt_parse_pr_out_transport_id(struct se_portal_group *se_tpg, srpt_parse_pr_out_transport_id() argument
3398 static struct se_node_acl *srpt_alloc_fabric_acl(struct se_portal_group *se_tpg) srpt_alloc_fabric_acl() argument
3411 static void srpt_release_fabric_acl(struct se_portal_group *se_tpg, srpt_release_fabric_acl() argument
3420 static u32 srpt_tpg_get_inst_index(struct se_portal_group *se_tpg) srpt_tpg_get_inst_index() argument
3610 struct se_portal_group *se_tpg, srpt_tpg_attrib_show_srp_max_rdma_size()
3613 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_show_srp_max_rdma_size()
3619 struct se_portal_group *se_tpg, srpt_tpg_attrib_store_srp_max_rdma_size()
3623 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_store_srp_max_rdma_size()
3650 struct se_portal_group *se_tpg, srpt_tpg_attrib_show_srp_max_rsp_size()
3653 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_show_srp_max_rsp_size()
3659 struct se_portal_group *se_tpg, srpt_tpg_attrib_store_srp_max_rsp_size()
3663 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_store_srp_max_rsp_size()
3690 struct se_portal_group *se_tpg, srpt_tpg_attrib_show_srp_sq_size()
3693 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_show_srp_sq_size()
3699 struct se_portal_group *se_tpg, srpt_tpg_attrib_store_srp_sq_size()
3703 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_attrib_store_srp_sq_size()
3737 struct se_portal_group *se_tpg, srpt_tpg_show_enable()
3740 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_show_enable()
3746 struct se_portal_group *se_tpg, srpt_tpg_store_enable()
3750 struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); srpt_tpg_store_enable()
3609 srpt_tpg_attrib_show_srp_max_rdma_size( struct se_portal_group *se_tpg, char *page) srpt_tpg_attrib_show_srp_max_rdma_size() argument
3618 srpt_tpg_attrib_store_srp_max_rdma_size( struct se_portal_group *se_tpg, const char *page, size_t count) srpt_tpg_attrib_store_srp_max_rdma_size() argument
3649 srpt_tpg_attrib_show_srp_max_rsp_size( struct se_portal_group *se_tpg, char *page) srpt_tpg_attrib_show_srp_max_rsp_size() argument
3658 srpt_tpg_attrib_store_srp_max_rsp_size( struct se_portal_group *se_tpg, const char *page, size_t count) srpt_tpg_attrib_store_srp_max_rsp_size() argument
3689 srpt_tpg_attrib_show_srp_sq_size( struct se_portal_group *se_tpg, char *page) srpt_tpg_attrib_show_srp_sq_size() argument
3698 srpt_tpg_attrib_store_srp_sq_size( struct se_portal_group *se_tpg, const char *page, size_t count) srpt_tpg_attrib_store_srp_sq_size() argument
3736 srpt_tpg_show_enable( struct se_portal_group *se_tpg, char *page) srpt_tpg_show_enable() argument
3745 srpt_tpg_store_enable( struct se_portal_group *se_tpg, const char *page, size_t count) srpt_tpg_store_enable() argument
/linux-4.1.27/include/target/
H A Dtarget_core_base.h602 struct se_portal_group *se_tpg; member in struct:se_node_acl
623 struct se_portal_group *se_tpg; member in struct:se_session

Completed in 630 milliseconds