Lines Matching refs:pla
780 struct qlt_plogi_ack_t *pla; in qlt_plogi_ack_find_add() local
784 list_for_each_entry(pla, &vha->plogi_ack_list, list) { in qlt_plogi_ack_find_add()
785 if (pla->id.b24 == id->b24) { in qlt_plogi_ack_find_add()
789 pla->iocb.u.isp24.port_name); in qlt_plogi_ack_find_add()
790 qlt_send_term_imm_notif(vha, &pla->iocb, 1); in qlt_plogi_ack_find_add()
791 memcpy(&pla->iocb, iocb, sizeof(pla->iocb)); in qlt_plogi_ack_find_add()
792 return pla; in qlt_plogi_ack_find_add()
796 pla = kmem_cache_zalloc(qla_tgt_plogi_cachep, GFP_ATOMIC); in qlt_plogi_ack_find_add()
797 if (!pla) { in qlt_plogi_ack_find_add()
804 memcpy(&pla->iocb, iocb, sizeof(pla->iocb)); in qlt_plogi_ack_find_add()
805 pla->id = *id; in qlt_plogi_ack_find_add()
806 list_add_tail(&pla->list, &vha->plogi_ack_list); in qlt_plogi_ack_find_add()
808 return pla; in qlt_plogi_ack_find_add()
812 struct qlt_plogi_ack_t *pla) in qlt_plogi_ack_unref() argument
814 struct imm_ntfy_from_isp *iocb = &pla->iocb; in qlt_plogi_ack_unref()
817 fc_port_t *fcport = pla->fcport; in qlt_plogi_ack_unref()
819 BUG_ON(!pla->ref_count); in qlt_plogi_ack_unref()
820 pla->ref_count--; in qlt_plogi_ack_unref()
822 if (pla->ref_count) in qlt_plogi_ack_unref()
848 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla) in qlt_plogi_ack_unref()
850 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla) in qlt_plogi_ack_unref()
854 list_del(&pla->list); in qlt_plogi_ack_unref()
855 kmem_cache_free(qla_tgt_plogi_cachep, pla); in qlt_plogi_ack_unref()
859 qlt_plogi_ack_link(struct scsi_qla_host *vha, struct qlt_plogi_ack_t *pla, in qlt_plogi_ack_link() argument
862 struct imm_ntfy_from_isp *iocb = &pla->iocb; in qlt_plogi_ack_link()
864 pla->ref_count++; in qlt_plogi_ack_link()
872 pla->ref_count, pla, link); in qlt_plogi_ack_link()
878 pla->ref_count--; in qlt_plogi_ack_link()
889 pla->fcport = sess; in qlt_plogi_ack_link()
891 sess->plogi_link[link] = pla; in qlt_plogi_ack_link()
4739 struct qlt_plogi_ack_t *pla; in qlt_handle_login() local
4802 pla = qlt_plogi_ack_find_add(vha, &port_id, iocb); in qlt_handle_login()
4803 if (!pla) { in qlt_handle_login()
4814 qlt_plogi_ack_link(vha, pla, conflict_sess, in qlt_handle_login()
4819 pla->ref_count++; in qlt_handle_login()
4827 pla, 0); in qlt_handle_login()
4831 pla, 0); in qlt_handle_login()
4856 list_del(&pla->list); in qlt_handle_login()
4857 kmem_cache_free(qla_tgt_plogi_cachep, pla); in qlt_handle_login()
4864 qlt_plogi_ack_link(vha, pla, sess, QLT_PLOGI_LINK_SAME_WWN); in qlt_handle_login()
4909 qlt_plogi_ack_unref(vha, pla); in qlt_handle_login()