Lines Matching refs:lport

166 	struct tcm_qla2xxx_lport *lport = tpg->lport;  in tcm_qla2xxx_get_fabric_wwn()  local
168 return lport->lport_naa_name; in tcm_qla2xxx_get_fabric_wwn()
788 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_clear_nacl_from_fcport_map() local
796 node = btree_remove32(&lport->lport_fcport_map, nacl->nport_id); in tcm_qla2xxx_clear_nacl_from_fcport_map()
804 btree_insert32(&lport->lport_fcport_map, nacl->nport_id, in tcm_qla2xxx_clear_nacl_from_fcport_map()
819 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess); in tcm_qla2xxx_clear_nacl_from_fcport_map()
912 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_enable_tpg() local
914 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_enable_tpg()
986 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_make_tpg() local
1007 tpg->lport = lport; in tcm_qla2xxx_make_tpg()
1025 lport->tpg_1 = tpg; in tcm_qla2xxx_make_tpg()
1034 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_drop_tpg() local
1035 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_tpg()
1047 lport->tpg_1 = NULL; in tcm_qla2xxx_drop_tpg()
1055 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_npiv_enable_tpg() local
1057 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_npiv_enable_tpg()
1082 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_make_tpg() local
1098 tpg->lport = lport; in tcm_qla2xxx_npiv_make_tpg()
1115 lport->tpg_1 = tpg; in tcm_qla2xxx_npiv_make_tpg()
1125 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_s_id() local
1130 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_s_id()
1131 if (!lport) { in tcm_qla2xxx_find_sess_by_s_id()
1140 se_nacl = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_find_sess_by_s_id()
1161 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_s_id() argument
1175 slot = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1180 rc = btree_insert32(&lport->lport_fcport_map, key, in tcm_qla2xxx_set_sess_by_s_id()
1197 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1202 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1210 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1215 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1230 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_loop_id() local
1235 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_loop_id()
1236 if (!lport) { in tcm_qla2xxx_find_sess_by_loop_id()
1244 fc_loopid = lport->lport_loopid_map + loop_id; in tcm_qla2xxx_find_sess_by_loop_id()
1266 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_loop_id() argument
1279 lport->lport_loopid_map)[loop_id]; in tcm_qla2xxx_set_sess_by_loop_id()
1329 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_clear_sess_lookup() argument
1334 tcm_qla2xxx_set_sess_by_s_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1336 tcm_qla2xxx_set_sess_by_loop_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1346 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_free_session() local
1355 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_free_session()
1356 if (!lport) { in tcm_qla2xxx_free_session()
1371 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_session_cb() local
1372 struct qla_hw_data *ha = lport->qla_vha->hw; in tcm_qla2xxx_session_cb()
1385 tcm_qla2xxx_set_sess_by_s_id(lport, se_nacl, nacl, se_sess, qlat_sess, in tcm_qla2xxx_session_cb()
1387 tcm_qla2xxx_set_sess_by_loop_id(lport, se_nacl, nacl, in tcm_qla2xxx_session_cb()
1404 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_check_initiator_node_acl() local
1411 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_check_initiator_node_acl()
1412 if (!lport) { in tcm_qla2xxx_check_initiator_node_acl()
1420 tpg = lport->tpg_1; in tcm_qla2xxx_check_initiator_node_acl()
1451 struct tcm_qla2xxx_lport *lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_update_sess() local
1474 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl) in tcm_qla2xxx_update_sess()
1475 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL; in tcm_qla2xxx_update_sess()
1477 lport->lport_loopid_map[loop_id].se_nacl = se_nacl; in tcm_qla2xxx_update_sess()
1487 if (btree_lookup32(&lport->lport_fcport_map, key)) in tcm_qla2xxx_update_sess()
1488 WARN(btree_remove32(&lport->lport_fcport_map, key) != in tcm_qla2xxx_update_sess()
1501 if (btree_lookup32(&lport->lport_fcport_map, key)) { in tcm_qla2xxx_update_sess()
1504 btree_update32(&lport->lport_fcport_map, key, se_nacl); in tcm_qla2xxx_update_sess()
1506 btree_insert32(&lport->lport_fcport_map, key, se_nacl, in tcm_qla2xxx_update_sess()
1542 static int tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport) in tcm_qla2xxx_init_lport() argument
1547 rc = btree_init32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1555 lport->lport_loopid_map = vzalloc(map_sz); in tcm_qla2xxx_init_lport()
1556 if (!lport->lport_loopid_map) { in tcm_qla2xxx_init_lport()
1558 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1570 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_cb() local
1577 lport->qla_vha = vha; in tcm_qla2xxx_lport_register_cb()
1587 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_make_lport() local
1594 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_make_lport()
1595 if (!lport) { in tcm_qla2xxx_make_lport()
1599 lport->lport_wwpn = wwpn; in tcm_qla2xxx_make_lport()
1600 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN, in tcm_qla2xxx_make_lport()
1602 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn); in tcm_qla2xxx_make_lport()
1604 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_make_lport()
1608 ret = qlt_lport_register(lport, wwpn, 0, 0, in tcm_qla2xxx_make_lport()
1613 return &lport->lport_wwn; in tcm_qla2xxx_make_lport()
1615 vfree(lport->lport_loopid_map); in tcm_qla2xxx_make_lport()
1616 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_make_lport()
1618 kfree(lport); in tcm_qla2xxx_make_lport()
1624 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_drop_lport() local
1626 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_lport()
1640 vfree(lport->lport_loopid_map); in tcm_qla2xxx_drop_lport()
1641 btree_for_each_safe32(&lport->lport_fcport_map, key, node) in tcm_qla2xxx_drop_lport()
1642 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_drop_lport()
1643 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_drop_lport()
1644 kfree(lport); in tcm_qla2xxx_drop_lport()
1654 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_npiv_cb() local
1688 lport->qla_vha = npiv_vha; in tcm_qla2xxx_lport_register_npiv_cb()
1699 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_npiv_make_lport() local
1720 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_npiv_make_lport()
1721 if (!lport) { in tcm_qla2xxx_npiv_make_lport()
1725 lport->lport_npiv_wwpn = npiv_wwpn; in tcm_qla2xxx_npiv_make_lport()
1726 lport->lport_npiv_wwnn = npiv_wwnn; in tcm_qla2xxx_npiv_make_lport()
1727 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn); in tcm_qla2xxx_npiv_make_lport()
1729 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_npiv_make_lport()
1733 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn, in tcm_qla2xxx_npiv_make_lport()
1738 return &lport->lport_wwn; in tcm_qla2xxx_npiv_make_lport()
1740 vfree(lport->lport_loopid_map); in tcm_qla2xxx_npiv_make_lport()
1741 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_npiv_make_lport()
1743 kfree(lport); in tcm_qla2xxx_npiv_make_lport()
1749 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_drop_lport() local
1751 struct scsi_qla_host *npiv_vha = lport->qla_vha; in tcm_qla2xxx_npiv_drop_lport()
1761 kfree(lport); in tcm_qla2xxx_npiv_drop_lport()