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()
798 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_clear_nacl_from_fcport_map() local
806 node = btree_remove32(&lport->lport_fcport_map, nacl->nport_id); in tcm_qla2xxx_clear_nacl_from_fcport_map()
814 btree_insert32(&lport->lport_fcport_map, nacl->nport_id, in tcm_qla2xxx_clear_nacl_from_fcport_map()
829 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess); in tcm_qla2xxx_clear_nacl_from_fcport_map()
922 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_enable_tpg() local
924 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_enable_tpg()
996 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_make_tpg() local
1017 tpg->lport = lport; in tcm_qla2xxx_make_tpg()
1035 lport->tpg_1 = tpg; in tcm_qla2xxx_make_tpg()
1044 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_drop_tpg() local
1045 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_tpg()
1057 lport->tpg_1 = NULL; in tcm_qla2xxx_drop_tpg()
1065 struct tcm_qla2xxx_lport *lport = container_of(se_wwn, in tcm_qla2xxx_npiv_enable_tpg() local
1067 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_npiv_enable_tpg()
1092 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_make_tpg() local
1108 tpg->lport = lport; in tcm_qla2xxx_npiv_make_tpg()
1125 lport->tpg_1 = tpg; in tcm_qla2xxx_npiv_make_tpg()
1135 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_s_id() local
1140 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_s_id()
1141 if (!lport) { in tcm_qla2xxx_find_sess_by_s_id()
1150 se_nacl = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_find_sess_by_s_id()
1171 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_s_id() argument
1185 slot = btree_lookup32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1190 rc = btree_insert32(&lport->lport_fcport_map, key, in tcm_qla2xxx_set_sess_by_s_id()
1207 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1212 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1220 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_set_sess_by_s_id()
1225 btree_update32(&lport->lport_fcport_map, key, new_se_nacl); in tcm_qla2xxx_set_sess_by_s_id()
1240 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_find_sess_by_loop_id() local
1245 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_find_sess_by_loop_id()
1246 if (!lport) { in tcm_qla2xxx_find_sess_by_loop_id()
1254 fc_loopid = lport->lport_loopid_map + loop_id; in tcm_qla2xxx_find_sess_by_loop_id()
1276 struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_set_sess_by_loop_id() argument
1289 lport->lport_loopid_map)[loop_id]; in tcm_qla2xxx_set_sess_by_loop_id()
1339 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *lport, in tcm_qla2xxx_clear_sess_lookup() argument
1344 tcm_qla2xxx_set_sess_by_s_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1346 tcm_qla2xxx_set_sess_by_loop_id(lport, NULL, nacl, se_sess, in tcm_qla2xxx_clear_sess_lookup()
1356 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_free_session() local
1365 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_free_session()
1366 if (!lport) { in tcm_qla2xxx_free_session()
1381 struct tcm_qla2xxx_lport *lport = tpg->lport; in tcm_qla2xxx_session_cb() local
1382 struct qla_hw_data *ha = lport->qla_vha->hw; in tcm_qla2xxx_session_cb()
1395 tcm_qla2xxx_set_sess_by_s_id(lport, se_nacl, nacl, se_sess, qlat_sess, in tcm_qla2xxx_session_cb()
1397 tcm_qla2xxx_set_sess_by_loop_id(lport, se_nacl, nacl, in tcm_qla2xxx_session_cb()
1414 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_check_initiator_node_acl() local
1421 lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_check_initiator_node_acl()
1422 if (!lport) { in tcm_qla2xxx_check_initiator_node_acl()
1430 tpg = lport->tpg_1; in tcm_qla2xxx_check_initiator_node_acl()
1461 struct tcm_qla2xxx_lport *lport = vha->vha_tgt.target_lport_ptr; in tcm_qla2xxx_update_sess() local
1484 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl) in tcm_qla2xxx_update_sess()
1485 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL; in tcm_qla2xxx_update_sess()
1487 lport->lport_loopid_map[loop_id].se_nacl = se_nacl; in tcm_qla2xxx_update_sess()
1497 if (btree_lookup32(&lport->lport_fcport_map, key)) in tcm_qla2xxx_update_sess()
1498 WARN(btree_remove32(&lport->lport_fcport_map, key) != in tcm_qla2xxx_update_sess()
1511 if (btree_lookup32(&lport->lport_fcport_map, key)) { in tcm_qla2xxx_update_sess()
1514 btree_update32(&lport->lport_fcport_map, key, se_nacl); in tcm_qla2xxx_update_sess()
1516 btree_insert32(&lport->lport_fcport_map, key, se_nacl, in tcm_qla2xxx_update_sess()
1552 static int tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport) in tcm_qla2xxx_init_lport() argument
1557 rc = btree_init32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1565 lport->lport_loopid_map = vzalloc(map_sz); in tcm_qla2xxx_init_lport()
1566 if (!lport->lport_loopid_map) { in tcm_qla2xxx_init_lport()
1568 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1580 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_cb() local
1587 lport->qla_vha = vha; in tcm_qla2xxx_lport_register_cb()
1597 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_make_lport() local
1604 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_make_lport()
1605 if (!lport) { in tcm_qla2xxx_make_lport()
1609 lport->lport_wwpn = wwpn; in tcm_qla2xxx_make_lport()
1610 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN, in tcm_qla2xxx_make_lport()
1612 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn); in tcm_qla2xxx_make_lport()
1614 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_make_lport()
1618 ret = qlt_lport_register(lport, wwpn, 0, 0, in tcm_qla2xxx_make_lport()
1623 return &lport->lport_wwn; in tcm_qla2xxx_make_lport()
1625 vfree(lport->lport_loopid_map); in tcm_qla2xxx_make_lport()
1626 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_make_lport()
1628 kfree(lport); in tcm_qla2xxx_make_lport()
1634 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_drop_lport() local
1636 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_lport()
1650 vfree(lport->lport_loopid_map); in tcm_qla2xxx_drop_lport()
1651 btree_for_each_safe32(&lport->lport_fcport_map, key, node) in tcm_qla2xxx_drop_lport()
1652 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_drop_lport()
1653 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_drop_lport()
1654 kfree(lport); in tcm_qla2xxx_drop_lport()
1664 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_npiv_cb() local
1698 lport->qla_vha = npiv_vha; in tcm_qla2xxx_lport_register_npiv_cb()
1709 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_npiv_make_lport() local
1730 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_npiv_make_lport()
1731 if (!lport) { in tcm_qla2xxx_npiv_make_lport()
1735 lport->lport_npiv_wwpn = npiv_wwpn; in tcm_qla2xxx_npiv_make_lport()
1736 lport->lport_npiv_wwnn = npiv_wwnn; in tcm_qla2xxx_npiv_make_lport()
1737 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn); in tcm_qla2xxx_npiv_make_lport()
1739 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_npiv_make_lport()
1743 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn, in tcm_qla2xxx_npiv_make_lport()
1748 return &lport->lport_wwn; in tcm_qla2xxx_npiv_make_lport()
1750 vfree(lport->lport_loopid_map); in tcm_qla2xxx_npiv_make_lport()
1751 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_npiv_make_lport()
1753 kfree(lport); in tcm_qla2xxx_npiv_make_lport()
1759 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_drop_lport() local
1761 struct scsi_qla_host *npiv_vha = lport->qla_vha; in tcm_qla2xxx_npiv_drop_lport()
1771 kfree(lport); in tcm_qla2xxx_npiv_drop_lport()