lpfc: Fix internal loopback failure.
authorJames Smart <james.smart@emulex.com>
Tue, 7 Apr 2015 19:07:23 +0000 (15:07 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 10 Apr 2015 14:49:52 +0000 (07:49 -0700)
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/lpfc/lpfc_els.c

index ba5da266a12804e58a6b780b5cbd41e01dfdb3f7..1003b5b51fd2b73ec95ae6c2fb3a85c5118fa93f 100644 (file)
@@ -3337,7 +3337,11 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                /* FLOGI retry policy */
                retry = 1;
                /* retry FLOGI forever */
-               maxretry = 0;
+               if (phba->link_flag != LS_LOOPBACK_MODE)
+                       maxretry = 0;
+               else
+                       maxretry = 2;
+
                if (cmdiocb->retry >= 100)
                        delay = 5000;
                else if (cmdiocb->retry >= 32)