Lines Matching refs:lport
166 struct tcm_qla2xxx_lport *lport = tpg->lport;
168 return lport->lport_naa_name;
788 struct tcm_qla2xxx_lport *lport = container_of(se_wwn,
796 node = btree_remove32(&lport->lport_fcport_map, nacl->nport_id);
804 btree_insert32(&lport->lport_fcport_map, nacl->nport_id,
811 * Now clear the se_nacl and session pointers from our HW lport lookup
819 tcm_qla2xxx_clear_sess_lookup(lport, nacl, sess);
912 struct tcm_qla2xxx_lport *lport = container_of(se_wwn,
914 struct scsi_qla_host *vha = lport->qla_vha;
986 struct tcm_qla2xxx_lport *lport = container_of(wwn,
1007 tpg->lport = lport;
1025 lport->tpg_1 = tpg;
1034 struct tcm_qla2xxx_lport *lport = tpg->lport;
1035 struct scsi_qla_host *vha = lport->qla_vha;
1047 lport->tpg_1 = NULL;
1055 struct tcm_qla2xxx_lport *lport = container_of(se_wwn,
1057 struct scsi_qla_host *vha = lport->qla_vha;
1082 struct tcm_qla2xxx_lport *lport = container_of(wwn,
1098 tpg->lport = lport;
1115 lport->tpg_1 = tpg;
1125 struct tcm_qla2xxx_lport *lport;
1130 lport = vha->vha_tgt.target_lport_ptr;
1131 if (!lport) {
1140 se_nacl = btree_lookup32(&lport->lport_fcport_map, key);
1161 struct tcm_qla2xxx_lport *lport,
1175 slot = btree_lookup32(&lport->lport_fcport_map, key);
1180 rc = btree_insert32(&lport->lport_fcport_map, key,
1197 btree_remove32(&lport->lport_fcport_map, key);
1202 btree_update32(&lport->lport_fcport_map, key, new_se_nacl);
1210 btree_remove32(&lport->lport_fcport_map, key);
1215 btree_update32(&lport->lport_fcport_map, key, new_se_nacl);
1230 struct tcm_qla2xxx_lport *lport;
1235 lport = vha->vha_tgt.target_lport_ptr;
1236 if (!lport) {
1244 fc_loopid = lport->lport_loopid_map + loop_id;
1266 struct tcm_qla2xxx_lport *lport,
1279 lport->lport_loopid_map)[loop_id];
1329 static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *lport,
1334 tcm_qla2xxx_set_sess_by_s_id(lport, NULL, nacl, se_sess,
1336 tcm_qla2xxx_set_sess_by_loop_id(lport, NULL, nacl, se_sess,
1346 struct tcm_qla2xxx_lport *lport;
1355 lport = vha->vha_tgt.target_lport_ptr;
1356 if (!lport) {
1371 struct tcm_qla2xxx_lport *lport = tpg->lport;
1372 struct qla_hw_data *ha = lport->qla_vha->hw;
1381 * And now setup se_nacl and session pointers into HW lport internal
1385 tcm_qla2xxx_set_sess_by_s_id(lport, se_nacl, nacl, se_sess, qlat_sess,
1387 tcm_qla2xxx_set_sess_by_loop_id(lport, se_nacl, nacl,
1404 struct tcm_qla2xxx_lport *lport;
1411 lport = vha->vha_tgt.target_lport_ptr;
1412 if (!lport) {
1420 tpg = lport->tpg_1;
1451 struct tcm_qla2xxx_lport *lport = vha->vha_tgt.target_lport_ptr;
1474 if (lport->lport_loopid_map[sess->loop_id].se_nacl == se_nacl)
1475 lport->lport_loopid_map[sess->loop_id].se_nacl = NULL;
1477 lport->lport_loopid_map[loop_id].se_nacl = se_nacl;
1487 if (btree_lookup32(&lport->lport_fcport_map, key))
1488 WARN(btree_remove32(&lport->lport_fcport_map, key) !=
1501 if (btree_lookup32(&lport->lport_fcport_map, key)) {
1504 btree_update32(&lport->lport_fcport_map, key, se_nacl);
1506 btree_insert32(&lport->lport_fcport_map, key, se_nacl,
1542 static int tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport)
1547 rc = btree_init32(&lport->lport_fcport_map);
1549 pr_err("Unable to initialize lport->lport_fcport_map btree\n");
1555 lport->lport_loopid_map = vzalloc(map_sz);
1556 if (!lport->lport_loopid_map) {
1557 pr_err("Unable to allocate lport->lport_loopid_map of %zu bytes\n", map_sz);
1558 btree_destroy32(&lport->lport_fcport_map);
1570 struct tcm_qla2xxx_lport *lport =
1577 lport->qla_vha = vha;
1587 struct tcm_qla2xxx_lport *lport;
1594 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL);
1595 if (!lport) {
1599 lport->lport_wwpn = wwpn;
1600 tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN,
1602 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) wwpn);
1604 ret = tcm_qla2xxx_init_lport(lport);
1608 ret = qlt_lport_register(lport, wwpn, 0, 0,
1613 return &lport->lport_wwn;
1615 vfree(lport->lport_loopid_map);
1616 btree_destroy32(&lport->lport_fcport_map);
1618 kfree(lport);
1624 struct tcm_qla2xxx_lport *lport = container_of(wwn,
1626 struct scsi_qla_host *vha = lport->qla_vha;
1640 vfree(lport->lport_loopid_map);
1641 btree_for_each_safe32(&lport->lport_fcport_map, key, node)
1642 btree_remove32(&lport->lport_fcport_map, key);
1643 btree_destroy32(&lport->lport_fcport_map);
1644 kfree(lport);
1654 struct tcm_qla2xxx_lport *lport =
1688 lport->qla_vha = npiv_vha;
1699 struct tcm_qla2xxx_lport *lport;
1720 lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL);
1721 if (!lport) {
1725 lport->lport_npiv_wwpn = npiv_wwpn;
1726 lport->lport_npiv_wwnn = npiv_wwnn;
1727 sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn);
1729 ret = tcm_qla2xxx_init_lport(lport);
1733 ret = qlt_lport_register(lport, phys_wwpn, npiv_wwpn, npiv_wwnn,
1738 return &lport->lport_wwn;
1740 vfree(lport->lport_loopid_map);
1741 btree_destroy32(&lport->lport_fcport_map);
1743 kfree(lport);
1749 struct tcm_qla2xxx_lport *lport = container_of(wwn,
1751 struct scsi_qla_host *npiv_vha = lport->qla_vha;
1761 kfree(lport);