Commit e30d5513 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology

An 'unexpected timeout' message may be seen in a point-2-point topology.
The message occurs when a PLOGI is received before the driver is notified
of FLOGI completion. The FLOGI completion failure causes discovery to be
triggered for a second time. The discovery timer is restarted but no new
discovery activity is initiated, thus the timeout message eventually
appears.

In point-2-point, when discovery has progressed before the FLOGI completion
is processed, it is not a failure. Add code to FLOGI completion to detect
that discovery has progressed and exit the FLOGI handling (noop'ing it).

Link: https://lore.kernel.org/r/20210514195559.119853-4-jsmart2021@gmail.comCo-developed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fa21189d
......@@ -1175,6 +1175,15 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
phba->fcf.fcf_redisc_attempted = 0; /* reset */
goto out;
}
} else if (vport->port_state > LPFC_FLOGI &&
vport->fc_flag & FC_PT2PT) {
/*
* In a p2p topology, it is possible that discovery has
* already progressed, and this completion can be ignored.
* Recheck the indicated topology.
*/
if (!sp->cmn.fPort)
goto out;
}
flogifail:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment