Skip to content

Commit 15af02d

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Allow PLOGI retry if previous PLOGI was aborted
A remote nport can stop responding to PLOGI beyond the ELS I/O timeout under some fault conditions. When this happens, the non-response triggers a dev_loss_tmo event from the transport which causes the driver to abort the PLOGI and stop any retries. This was due to a policy in the ELS completion handler whenever an ELS was terminated due to driver request. Revise the ELS completion path to detect PLOGIs that were aborted and allow retries. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 79b20be commit 15af02d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,6 +4577,19 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
45774577
retry = 1;
45784578
delay = 100;
45794579
break;
4580+
case IOERR_SLI_ABORTED:
4581+
/* Retry ELS PLOGI command?
4582+
* Possibly the rport just wasn't ready.
4583+
*/
4584+
if (cmd == ELS_CMD_PLOGI) {
4585+
/* No retry if state change */
4586+
if (ndlp &&
4587+
ndlp->nlp_state != NLP_STE_PLOGI_ISSUE)
4588+
goto out_retry;
4589+
retry = 1;
4590+
maxretry = 2;
4591+
}
4592+
break;
45804593
}
45814594
break;
45824595

0 commit comments

Comments
 (0)