Lines Matching refs:lport

197 	struct tcm_qla2xxx_lport *lport = tpg->lport;  in tcm_qla2xxx_get_fabric_proto_ident()  local
200 switch (lport->lport_proto_id) { in tcm_qla2xxx_get_fabric_proto_ident()
214 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_get_fabric_wwn() local
216 return lport->lport_naa_name; in tcm_qla2xxx_get_fabric_wwn()
240 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_get_pr_transport_id() local
243 switch (lport->lport_proto_id) { in tcm_qla2xxx_get_pr_transport_id()
262 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_get_pr_transport_id_len() local
265 switch (lport->lport_proto_id) { in tcm_qla2xxx_get_pr_transport_id_len()
284 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_parse_pr_out_transport_id() local
287 switch (lport->lport_proto_id) { in tcm_qla2xxx_parse_pr_out_transport_id()
778 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_clear_nacl_from_fcport_map() local
786 node = btree_remove32(&lport->lport_fcport_map, nacl->nport_id); in tcm_qla2xxx_clear_nacl_from_fcport_map()
794 btree_insert32(&lport->lport_fcport_map, nacl->nport_id, in tcm_qla2xxx_clear_nacl_from_fcport_map()
809 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess); in tcm_qla2xxx_clear_nacl_from_fcport_map()
1012 struct scsi_qla_host *base_vha = base_tpg->lport->qla_vha; in tcm_qla2xxx_depend_tpg()
1026 struct scsi_qla_host *base_vha = base_tpg->lport->qla_vha; in tcm_qla2xxx_undepend_tpg()
1136 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_make_tpg() local
1157 tpg->lport = lport; in tcm_qla2xxx_make_tpg()
1175 lport->tpg_1 = tpg; in tcm_qla2xxx_make_tpg()
1184 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_drop_tpg() local
1185 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_tpg()
1197 lport->tpg_1 = NULL; in tcm_qla2xxx_drop_tpg()
1214 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_npiv_tpg_store_enable() local
1216 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_npiv_tpg_store_enable()
1260 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_make_tpg() local
1276 tpg->lport = lport; in tcm_qla2xxx_npiv_make_tpg()
1294 lport->tpg_1 = tpg; in tcm_qla2xxx_npiv_make_tpg()
1305 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_s_id() local
1310 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_s_id()
1311 if (!lport) { in tcm_qla2xxx_find_sess_by_s_id()
1320 se_nacl = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_find_sess_by_s_id()
1341 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_s_id() argument
1355 slot = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1360 rc = btree_insert32(&lport->lport_fcport_map, key, in tcm_qla2xxx_set_sess_by_s_id()
1377 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1382 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1390 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1395 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1410 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_loop_id() local
1415 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_loop_id()
1416 if (!lport) { in tcm_qla2xxx_find_sess_by_loop_id()
1424 fc_loopid = lport->lport_loopid_map + loop_id; in tcm_qla2xxx_find_sess_by_loop_id()
1446 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_loop_id() argument
1459 lport->lport_loopid_map)[loop_id]; in tcm_qla2xxx_set_sess_by_loop_id()
1509 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_clear_sess_lookup() argument
1519 tcm_qla2xxx_set_sess_by_s_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1521 tcm_qla2xxx_set_sess_by_loop_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1532 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_free_session() local
1546 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_free_session()
1547 if (!lport) { in tcm_qla2xxx_free_session()
1570 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_check_initiator_node_acl() local
1582 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_check_initiator_node_acl()
1583 if (!lport) { in tcm_qla2xxx_check_initiator_node_acl()
1591 tpg = lport->tpg_1; in tcm_qla2xxx_check_initiator_node_acl()
1628 tcm_qla2xxx_set_sess_by_s_id(lport, se_nacl, nacl, se_sess, in tcm_qla2xxx_check_initiator_node_acl()
1630 tcm_qla2xxx_set_sess_by_loop_id(lport, se_nacl, nacl, se_sess, in tcm_qla2xxx_check_initiator_node_acl()
1647 struct tcm_qla2xxx_lport *lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_update_sess() local
1670 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl) in tcm_qla2xxx_update_sess()
1671 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL; in tcm_qla2xxx_update_sess()
1673 lport->lport_loopid_map[loop_id].se_nacl = se_nacl; in tcm_qla2xxx_update_sess()
1683 if (btree_lookup32(&lport->lport_fcport_map, key)) in tcm_qla2xxx_update_sess()
1684 WARN(btree_remove32(&lport->lport_fcport_map, key) != se_nacl, in tcm_qla2xxx_update_sess()
1695 if (btree_lookup32(&lport->lport_fcport_map, key)) { in tcm_qla2xxx_update_sess()
1698 btree_update32(&lport->lport_fcport_map, key, se_nacl); in tcm_qla2xxx_update_sess()
1700 btree_insert32(&lport->lport_fcport_map, key, se_nacl, GFP_ATOMIC); in tcm_qla2xxx_update_sess()
1734 static int tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport) in tcm_qla2xxx_init_lport() argument
1738 rc = btree_init32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1744 lport->lport_loopid_map = vmalloc(sizeof(struct tcm_qla2xxx_fc_loopid) * in tcm_qla2xxx_init_lport()
1746 if (!lport->lport_loopid_map) { in tcm_qla2xxx_init_lport()
1749 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1752 memset(lport->lport_loopid_map, 0, sizeof(struct tcm_qla2xxx_fc_loopid) in tcm_qla2xxx_init_lport()
1764 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_cb() local
1771 lport->qla_vha = vha; in tcm_qla2xxx_lport_register_cb()
1781 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_make_lport() local
1788 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_make_lport()
1789 if (!lport) { in tcm_qla2xxx_make_lport()
1793 lport->lport_wwpn = wwpn; in tcm_qla2xxx_make_lport()
1794 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN, in tcm_qla2xxx_make_lport()
1796 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn); in tcm_qla2xxx_make_lport()
1798 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_make_lport()
1802 ret = qlt_lport_register(lport, wwpn, 0, 0, in tcm_qla2xxx_make_lport()
1807 return &lport->lport_wwn; in tcm_qla2xxx_make_lport()
1809 vfree(lport->lport_loopid_map); in tcm_qla2xxx_make_lport()
1810 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_make_lport()
1812 kfree(lport); in tcm_qla2xxx_make_lport()
1818 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_drop_lport() local
1820 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_lport()
1834 vfree(lport->lport_loopid_map); in tcm_qla2xxx_drop_lport()
1835 btree_for_each_safe32(&lport->lport_fcport_map, key, node) in tcm_qla2xxx_drop_lport()
1836 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_drop_lport()
1837 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_drop_lport()
1838 kfree(lport); in tcm_qla2xxx_drop_lport()
1848 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_npiv_cb() local
1884 lport->qla_vha = npiv_vha; in tcm_qla2xxx_lport_register_npiv_cb()
1895 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_npiv_make_lport() local
1916 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_npiv_make_lport()
1917 if (!lport) { in tcm_qla2xxx_npiv_make_lport()
1921 lport->lport_npiv_wwpn = npiv_wwpn; in tcm_qla2xxx_npiv_make_lport()
1922 lport->lport_npiv_wwnn = npiv_wwnn; in tcm_qla2xxx_npiv_make_lport()
1923 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn); in tcm_qla2xxx_npiv_make_lport()
1925 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_npiv_make_lport()
1929 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn, in tcm_qla2xxx_npiv_make_lport()
1934 return &lport->lport_wwn; in tcm_qla2xxx_npiv_make_lport()
1936 vfree(lport->lport_loopid_map); in tcm_qla2xxx_npiv_make_lport()
1937 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_npiv_make_lport()
1939 kfree(lport); in tcm_qla2xxx_npiv_make_lport()
1945 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_drop_lport() local
1947 struct scsi_qla_host *npiv_vha = lport->qla_vha; in tcm_qla2xxx_npiv_drop_lport()
1957 kfree(lport); in tcm_qla2xxx_npiv_drop_lport()