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
1556 rc = btree_init32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1562 lport->lport_loopid_map = in tcm_qla2xxx_init_lport()
1565 if (!lport->lport_loopid_map) { in tcm_qla2xxx_init_lport()
1568 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_init_lport()
1581 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_cb() local
1588 lport->qla_vha = vha; in tcm_qla2xxx_lport_register_cb()
1598 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_make_lport() local
1605 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_make_lport()
1606 if (!lport) { in tcm_qla2xxx_make_lport()
1610 lport->lport_wwpn = wwpn; in tcm_qla2xxx_make_lport()
1611 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN, in tcm_qla2xxx_make_lport()
1613 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn); in tcm_qla2xxx_make_lport()
1615 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_make_lport()
1619 ret = qlt_lport_register(lport, wwpn, 0, 0, in tcm_qla2xxx_make_lport()
1624 return &lport->lport_wwn; in tcm_qla2xxx_make_lport()
1626 vfree(lport->lport_loopid_map); in tcm_qla2xxx_make_lport()
1627 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_make_lport()
1629 kfree(lport); in tcm_qla2xxx_make_lport()
1635 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_drop_lport() local
1637 struct scsi_qla_host *vha = lport->qla_vha; in tcm_qla2xxx_drop_lport()
1651 vfree(lport->lport_loopid_map); in tcm_qla2xxx_drop_lport()
1652 btree_for_each_safe32(&lport->lport_fcport_map, key, node) in tcm_qla2xxx_drop_lport()
1653 btree_remove32(&lport->lport_fcport_map, key); in tcm_qla2xxx_drop_lport()
1654 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_drop_lport()
1655 kfree(lport); in tcm_qla2xxx_drop_lport()
1665 struct tcm_qla2xxx_lport *lport = in tcm_qla2xxx_lport_register_npiv_cb() local
1699 lport->qla_vha = npiv_vha; in tcm_qla2xxx_lport_register_npiv_cb()
1710 struct tcm_qla2xxx_lport *lport; in tcm_qla2xxx_npiv_make_lport() local
1731 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL); in tcm_qla2xxx_npiv_make_lport()
1732 if (!lport) { in tcm_qla2xxx_npiv_make_lport()
1736 lport->lport_npiv_wwpn = npiv_wwpn; in tcm_qla2xxx_npiv_make_lport()
1737 lport->lport_npiv_wwnn = npiv_wwnn; in tcm_qla2xxx_npiv_make_lport()
1738 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn); in tcm_qla2xxx_npiv_make_lport()
1740 ret = tcm_qla2xxx_init_lport(lport); in tcm_qla2xxx_npiv_make_lport()
1744 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn, in tcm_qla2xxx_npiv_make_lport()
1749 return &lport->lport_wwn; in tcm_qla2xxx_npiv_make_lport()
1751 vfree(lport->lport_loopid_map); in tcm_qla2xxx_npiv_make_lport()
1752 btree_destroy32(&lport->lport_fcport_map); in tcm_qla2xxx_npiv_make_lport()
1754 kfree(lport); in tcm_qla2xxx_npiv_make_lport()
1760 struct tcm_qla2xxx_lport *lport = container_of(wwn, in tcm_qla2xxx_npiv_drop_lport() local
1762 struct scsi_qla_host *npiv_vha = lport->qla_vha; in tcm_qla2xxx_npiv_drop_lport()
1772 kfree(lport); in tcm_qla2xxx_npiv_drop_lport()