/* This routine handles processing a REG_LOGIN mailbox command upon completion. It is setup in the LPFC_MBOXQ as the completion routine when the command is handed off to the SLI layer.  */
void lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
/* This routine handles processing a REG_LOGIN mailbox command upon completion. It is setup in the LPFC_MBOXQ as the completion routine when the command is handed off to the SLI layer.  */
void lpfc_mbx_cmpl_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
{
	struct lpfc_vport  *vport = pmb->vport;
	struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) (pmb->context1);
	struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *) pmb->context2;
	pmb->context1 = NULL;
	lpfc_disc_state_machine(vport, ndlp, pmb, NLP_EVT_CMPL_REG_LOGIN);
	lpfc_mbuf_free(phba, mp->virt, mp->phys);
	kfree(mp);
	mempool_free(pmb, phba->mbox_mem_pool);
	lpfc_nlp_put(ndlp);
	return;
}