From: James Smart <james.smart@emulex.com>
Date: Thu, 3 Jan 2013 20:43:19 +0000 (-0500)
Subject: [SCSI] lpfc 8.3.37: Fixed exhausted retry for plogi to nameserver.
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5b5b36a92b34cf78bb3f2fec2127846b12b4fe2f;p=linux.git

[SCSI] lpfc 8.3.37: Fixed exhausted retry for plogi to nameserver.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
---

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index f0e2fae1214cf..08d156a9094fe 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -3122,6 +3122,13 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
 
 		case IOERR_SEQUENCE_TIMEOUT:
 		case IOERR_INVALID_RPI:
+			if (cmd == ELS_CMD_PLOGI &&
+			    did == NameServer_DID) {
+				/* Continue forever if plogi to */
+				/* the nameserver fails */
+				maxretry = 0;
+				delay = 100;
+			}
 			retry = 1;
 			break;
 		}