Lines Matching refs:pla
803 struct qlt_plogi_ack_t *pla; in qlt_plogi_ack_find_add() local
807 list_for_each_entry(pla, &vha->plogi_ack_list, list) { in qlt_plogi_ack_find_add()
808 if (pla->id.b24 == id->b24) { in qlt_plogi_ack_find_add()
812 pla->iocb.u.isp24.port_name); in qlt_plogi_ack_find_add()
813 qlt_send_term_imm_notif(vha, &pla->iocb, 1); in qlt_plogi_ack_find_add()
814 memcpy(&pla->iocb, iocb, sizeof(pla->iocb)); in qlt_plogi_ack_find_add()
815 return pla; in qlt_plogi_ack_find_add()
819 pla = kmem_cache_zalloc(qla_tgt_plogi_cachep, GFP_ATOMIC); in qlt_plogi_ack_find_add()
820 if (!pla) { in qlt_plogi_ack_find_add()
827 memcpy(&pla->iocb, iocb, sizeof(pla->iocb)); in qlt_plogi_ack_find_add()
828 pla->id = *id; in qlt_plogi_ack_find_add()
829 list_add_tail(&pla->list, &vha->plogi_ack_list); in qlt_plogi_ack_find_add()
831 return pla; in qlt_plogi_ack_find_add()
835 struct qlt_plogi_ack_t *pla) in qlt_plogi_ack_unref() argument
837 struct imm_ntfy_from_isp *iocb = &pla->iocb; in qlt_plogi_ack_unref()
840 fc_port_t *fcport = pla->fcport; in qlt_plogi_ack_unref()
842 BUG_ON(!pla->ref_count); in qlt_plogi_ack_unref()
843 pla->ref_count--; in qlt_plogi_ack_unref()
845 if (pla->ref_count) in qlt_plogi_ack_unref()
871 if (fcport->plogi_link[QLT_PLOGI_LINK_SAME_WWN] == pla) in qlt_plogi_ack_unref()
873 if (fcport->plogi_link[QLT_PLOGI_LINK_CONFLICT] == pla) in qlt_plogi_ack_unref()
877 list_del(&pla->list); in qlt_plogi_ack_unref()
878 kmem_cache_free(qla_tgt_plogi_cachep, pla); in qlt_plogi_ack_unref()
882 qlt_plogi_ack_link(struct scsi_qla_host *vha, struct qlt_plogi_ack_t *pla, in qlt_plogi_ack_link() argument
885 struct imm_ntfy_from_isp *iocb = &pla->iocb; in qlt_plogi_ack_link()
887 pla->ref_count++; in qlt_plogi_ack_link()
895 pla->ref_count, pla, link); in qlt_plogi_ack_link()
901 pla->ref_count--; in qlt_plogi_ack_link()
912 pla->fcport = sess; in qlt_plogi_ack_link()
914 sess->plogi_link[link] = pla; in qlt_plogi_ack_link()
4772 struct qlt_plogi_ack_t *pla; in qlt_handle_login() local
4835 pla = qlt_plogi_ack_find_add(vha, &port_id, iocb); in qlt_handle_login()
4836 if (!pla) { in qlt_handle_login()
4847 qlt_plogi_ack_link(vha, pla, conflict_sess, in qlt_handle_login()
4852 pla->ref_count++; in qlt_handle_login()
4860 pla, 0); in qlt_handle_login()
4864 pla, 0); in qlt_handle_login()
4889 list_del(&pla->list); in qlt_handle_login()
4890 kmem_cache_free(qla_tgt_plogi_cachep, pla); in qlt_handle_login()
4897 qlt_plogi_ack_link(vha, pla, sess, QLT_PLOGI_LINK_SAME_WWN); in qlt_handle_login()
4942 qlt_plogi_ack_unref(vha, pla); in qlt_handle_login()