[SCSI] lpfc 8.3.31: Fix initiator sending flogi after acking flogi from target
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
b99570dd63
commit
e64464391d
2 changed files with 26 additions and 4 deletions
|
@ -3803,10 +3803,11 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
|
|||
/* Xmit ELS ACC response tag <ulpIoTag> */
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
"0128 Xmit ELS ACC response tag x%x, XRI: x%x, "
|
||||
"DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x\n",
|
||||
"DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x "
|
||||
"fc_flag x%x\n",
|
||||
elsiocb->iotag, elsiocb->iocb.ulpContext,
|
||||
ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state,
|
||||
ndlp->nlp_rpi);
|
||||
ndlp->nlp_rpi, vport->fc_flag);
|
||||
if (ndlp->nlp_flag & NLP_LOGO_ACC) {
|
||||
spin_lock_irq(shost->host_lock);
|
||||
ndlp->nlp_flag &= ~NLP_LOGO_ACC;
|
||||
|
@ -4976,7 +4977,10 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
|||
spin_lock_irq(shost->host_lock);
|
||||
vport->fc_flag |= FC_PT2PT_PLOGI;
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
}
|
||||
vport->fc_myDID = PT2PT_LocalID;
|
||||
} else
|
||||
vport->fc_myDID = PT2PT_RemoteID;
|
||||
vport->port_state = LPFC_FLOGI;
|
||||
spin_lock_irq(shost->host_lock);
|
||||
vport->fc_flag |= FC_PT2PT;
|
||||
vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP);
|
||||
|
@ -4995,7 +4999,25 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
|||
/* Send back ACC */
|
||||
lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb, ndlp, NULL);
|
||||
|
||||
if (!(vport->fc_flag & FC_PT2PT_PLOGI)) {
|
||||
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
|
||||
if (!mbox)
|
||||
goto fail;
|
||||
|
||||
lpfc_config_link(phba, mbox);
|
||||
|
||||
mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
|
||||
mbox->vport = vport;
|
||||
rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT);
|
||||
if (rc == MBX_NOT_FINISHED) {
|
||||
mempool_free(mbox, phba->mbox_mem_pool);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1094,7 +1094,7 @@ lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||
/* Start discovery by sending a FLOGI. port_state is identically
|
||||
* LPFC_FLOGI while waiting for FLOGI cmpl
|
||||
*/
|
||||
if (vport->port_state != LPFC_FLOGI)
|
||||
if (vport->port_state != LPFC_FLOGI || vport->fc_flag & FC_PT2PT_PLOGI)
|
||||
lpfc_initial_flogi(vport);
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue