scsi: lpfc: Fix PT2PT PLOGI collison stopping discovery
authorJames Smart <jsmart2021@gmail.com>
Wed, 22 May 2019 00:48:58 +0000 (17:48 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Jun 2019 23:46:21 +0000 (19:46 -0400)
Under heavy load the target stops responding, the drivers aborts
timeout and we start recovery by logging out of the target, but
the target is never logged into again.

In a point-to-point scenario, there were battling PLOGI's. When we
received a PLOGI request after having sent one, the driver cancels
the processing of the original plogi. However, the completion path
of the remaining plogi was coded to skip the reg_rpi that should
be happening on the 2nd plogi.

Correct by adding a simple pt2pt check such that the 2nd plogi isn't
skipped and the reg_login occurs.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c

index c8fb0b4..532728e 100644 (file)
@@ -4196,6 +4196,7 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                if ((rspiocb->iocb.ulpStatus == 0)
                    && (ndlp->nlp_flag & NLP_ACC_REGLOGIN)) {
                        if (!lpfc_unreg_rpi(vport, ndlp) &&
+                           (!(vport->fc_flag & FC_PT2PT)) &&
                            (ndlp->nlp_state ==  NLP_STE_PLOGI_ISSUE ||
                             ndlp->nlp_state == NLP_STE_REG_LOGIN_ISSUE)) {
                                lpfc_printf_vlog(vport, KERN_INFO,