/* This routine prepares the mailbox command for unregistering a remote N_Port/F_Port (DID) login.  */
void lpfc_unreg_did(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, LPFC_MBOXQ_t *pmb)
/* This routine prepares the mailbox command for unregistering a remote N_Port/F_Port (DID) login.  */
void lpfc_unreg_did(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, LPFC_MBOXQ_t *pmb)
{
	MAILBOX_t *mb;
	mb = &pmb->u.mb;
	memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
	mb->un.varUnregDID.did = did;
	if (vpi != 0xffff)
		vpi += phba->vpi_base;
	mb->un.varUnregDID.vpi = vpi;
	mb->mbxCommand = MBX_UNREG_D_ID;
	mb->mbxOwner = OWN_HOST;
	return;
}