Lines Matching refs:lport
192 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_get_fabric_wwn() local
194 return lport->lport_naa_name; in tcm_qla2xxx_get_fabric_wwn()
653 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_clear_nacl_from_fcport_map() local
661 node = btree_remove32(&lport->lport_fcport_map, nacl->nport_id); in tcm_qla2xxx_clear_nacl_from_fcport_map()
669 btree_insert32(&lport->lport_fcport_map, nacl->nport_id, in tcm_qla2xxx_clear_nacl_from_fcport_map()
684 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess); in tcm_qla2xxx_clear_nacl_from_fcport_map()
801 struct scsi_qla_host *base_vha = base_tpg->lport->qla_vha; in tcm_qla2xxx_depend_tpg()
815 struct scsi_qla_host *base_vha = base_tpg->lport->qla_vha; in tcm_qla2xxx_undepend_tpg()
921 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_make_tpg() local
942 tpg->lport = lport; in tcm_qla2xxx_make_tpg()
959 lport->tpg_1 = tpg; in tcm_qla2xxx_make_tpg()
968 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_drop_tpg() local
969 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_tpg()
981 lport->tpg_1 = NULL; in tcm_qla2xxx_drop_tpg()
996 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_npiv_tpg_enable_store() local
998 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_npiv_tpg_enable_store()
1042 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_make_tpg() local
1058 tpg->lport = lport; in tcm_qla2xxx_npiv_make_tpg()
1075 lport->tpg_1 = tpg; in tcm_qla2xxx_npiv_make_tpg()
1086 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_s_id() local
1091 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_s_id()
1092 if (!lport) { in tcm_qla2xxx_find_sess_by_s_id()
1101 se_nacl = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_find_sess_by_s_id()
1122 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_s_id() argument
1136 slot = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1141 rc = btree_insert32(&lport->lport_fcport_map, key, in tcm_qla2xxx_set_sess_by_s_id()
1158 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1163 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1171 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1176 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1191 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_loop_id() local
1196 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_loop_id()
1197 if (!lport) { in tcm_qla2xxx_find_sess_by_loop_id()
1205 fc_loopid = lport->lport_loopid_map + loop_id; in tcm_qla2xxx_find_sess_by_loop_id()
1227 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_loop_id() argument
1240 lport->lport_loopid_map)[loop_id]; in tcm_qla2xxx_set_sess_by_loop_id()
1290 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_clear_sess_lookup() argument
1300 tcm_qla2xxx_set_sess_by_s_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1302 tcm_qla2xxx_set_sess_by_loop_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1312 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_free_session() local
1323 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_free_session()
1324 if (!lport) { in tcm_qla2xxx_free_session()
1347 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_check_initiator_node_acl() local
1359 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_check_initiator_node_acl()
1360 if (!lport) { in tcm_qla2xxx_check_initiator_node_acl()
1368 tpg = lport->tpg_1; in tcm_qla2xxx_check_initiator_node_acl()
1405 tcm_qla2xxx_set_sess_by_s_id(lport, se_nacl, nacl, se_sess, in tcm_qla2xxx_check_initiator_node_acl()
1407 tcm_qla2xxx_set_sess_by_loop_id(lport, se_nacl, nacl, se_sess, in tcm_qla2xxx_check_initiator_node_acl()
1424 struct tcm_qla2xxx_lport *lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_update_sess() local
1447 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl) in tcm_qla2xxx_update_sess()
1448 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL; in tcm_qla2xxx_update_sess()
1450 lport->lport_loopid_map[loop_id].se_nacl = se_nacl; in tcm_qla2xxx_update_sess()
1460 if (btree_lookup32(&lport->lport_fcport_map, key)) in tcm_qla2xxx_update_sess()
1461 WARN(btree_remove32(&lport->lport_fcport_map, key) != se_nacl, in tcm_qla2xxx_update_sess()
1472 if (btree_lookup32(&lport->lport_fcport_map, key)) { in tcm_qla2xxx_update_sess()
1475 btree_update32(&lport->lport_fcport_map, key, se_nacl); in tcm_qla2xxx_update_sess()
1477 btree_insert32(&lport->lport_fcport_map, key, se_nacl, GFP_ATOMIC); in tcm_qla2xxx_update_sess()
1511 static int tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport) in tcm_qla2xxx_init_lport() argument
1515 rc = btree_init32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1521 lport->lport_loopid_map = vmalloc(sizeof(struct tcm_qla2xxx_fc_loopid) * in tcm_qla2xxx_init_lport()
1523 if (!lport->lport_loopid_map) { in tcm_qla2xxx_init_lport()
1526 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1529 memset(lport->lport_loopid_map, 0, sizeof(struct tcm_qla2xxx_fc_loopid) in tcm_qla2xxx_init_lport()
1541 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_cb() local
1548 lport->qla_vha = vha; in tcm_qla2xxx_lport_register_cb()
1558 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_make_lport() local
1565 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_make_lport()
1566 if (!lport) { in tcm_qla2xxx_make_lport()
1570 lport->lport_wwpn = wwpn; in tcm_qla2xxx_make_lport()
1571 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN, in tcm_qla2xxx_make_lport()
1573 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn); in tcm_qla2xxx_make_lport()
1575 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_make_lport()
1579 ret = qlt_lport_register(lport, wwpn, 0, 0, in tcm_qla2xxx_make_lport()
1584 return &lport->lport_wwn; in tcm_qla2xxx_make_lport()
1586 vfree(lport->lport_loopid_map); in tcm_qla2xxx_make_lport()
1587 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_make_lport()
1589 kfree(lport); in tcm_qla2xxx_make_lport()
1595 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_drop_lport() local
1597 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_lport()
1611 vfree(lport->lport_loopid_map); in tcm_qla2xxx_drop_lport()
1612 btree_for_each_safe32(&lport->lport_fcport_map, key, node) in tcm_qla2xxx_drop_lport()
1613 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_drop_lport()
1614 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_drop_lport()
1615 kfree(lport); in tcm_qla2xxx_drop_lport()
1625 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_npiv_cb() local
1659 lport->qla_vha = npiv_vha; in tcm_qla2xxx_lport_register_npiv_cb()
1670 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_npiv_make_lport() local
1691 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_npiv_make_lport()
1692 if (!lport) { in tcm_qla2xxx_npiv_make_lport()
1696 lport->lport_npiv_wwpn = npiv_wwpn; in tcm_qla2xxx_npiv_make_lport()
1697 lport->lport_npiv_wwnn = npiv_wwnn; in tcm_qla2xxx_npiv_make_lport()
1698 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn); in tcm_qla2xxx_npiv_make_lport()
1700 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_npiv_make_lport()
1704 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn, in tcm_qla2xxx_npiv_make_lport()
1709 return &lport->lport_wwn; in tcm_qla2xxx_npiv_make_lport()
1711 vfree(lport->lport_loopid_map); in tcm_qla2xxx_npiv_make_lport()
1712 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_npiv_make_lport()
1714 kfree(lport); in tcm_qla2xxx_npiv_make_lport()
1720 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_drop_lport() local
1722 struct scsi_qla_host *npiv_vha = lport->qla_vha; in tcm_qla2xxx_npiv_drop_lport()
1732 kfree(lport); in tcm_qla2xxx_npiv_drop_lport()