aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c54
1 files changed, 11 insertions, 43 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index ea511d18f0ec..b115e92025e5 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -795,7 +795,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
795 795
796 if (irsp->ulpStatus) { 796 if (irsp->ulpStatus) {
797 /* 797 /*
798 * In case of FIP mode, perform round robin FCF failover 798 * In case of FIP mode, perform roundrobin FCF failover
799 * due to new FCF discovery 799 * due to new FCF discovery
800 */ 800 */
801 if ((phba->hba_flag & HBA_FIP_SUPPORT) && 801 if ((phba->hba_flag & HBA_FIP_SUPPORT) &&
@@ -803,48 +803,16 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
803 (irsp->ulpStatus != IOSTAT_LOCAL_REJECT) && 803 (irsp->ulpStatus != IOSTAT_LOCAL_REJECT) &&
804 (irsp->un.ulpWord[4] != IOERR_SLI_ABORTED)) { 804 (irsp->un.ulpWord[4] != IOERR_SLI_ABORTED)) {
805 lpfc_printf_log(phba, KERN_WARNING, LOG_FIP | LOG_ELS, 805 lpfc_printf_log(phba, KERN_WARNING, LOG_FIP | LOG_ELS,
806 "2611 FLOGI failed on registered " 806 "2611 FLOGI failed on FCF (x%x), "
807 "FCF record fcf_index(%d), status: " 807 "status:x%x/x%x, tmo:x%x, perform "
808 "x%x/x%x, tmo:x%x, trying to perform " 808 "roundrobin FCF failover\n",
809 "round robin failover\n",
810 phba->fcf.current_rec.fcf_indx, 809 phba->fcf.current_rec.fcf_indx,
811 irsp->ulpStatus, irsp->un.ulpWord[4], 810 irsp->ulpStatus, irsp->un.ulpWord[4],
812 irsp->ulpTimeout); 811 irsp->ulpTimeout);
813 fcf_index = lpfc_sli4_fcf_rr_next_index_get(phba); 812 fcf_index = lpfc_sli4_fcf_rr_next_index_get(phba);
814 if (fcf_index == LPFC_FCOE_FCF_NEXT_NONE) { 813 rc = lpfc_sli4_fcf_rr_next_proc(vport, fcf_index);
815 /* 814 if (rc)
816 * Exhausted the eligible FCF record list, 815 goto out;
817 * fail through to retry FLOGI on current
818 * FCF record.
819 */
820 lpfc_printf_log(phba, KERN_WARNING,
821 LOG_FIP | LOG_ELS,
822 "2760 Completed one round "
823 "of FLOGI FCF round robin "
824 "failover list, retry FLOGI "
825 "on currently registered "
826 "FCF index:%d\n",
827 phba->fcf.current_rec.fcf_indx);
828 } else {
829 lpfc_printf_log(phba, KERN_INFO,
830 LOG_FIP | LOG_ELS,
831 "2794 FLOGI FCF round robin "
832 "failover to FCF index x%x\n",
833 fcf_index);
834 rc = lpfc_sli4_fcf_rr_read_fcf_rec(phba,
835 fcf_index);
836 if (rc)
837 lpfc_printf_log(phba, KERN_WARNING,
838 LOG_FIP | LOG_ELS,
839 "2761 FLOGI round "
840 "robin FCF failover "
841 "read FCF failed "
842 "rc:x%x, fcf_index:"
843 "%d\n", rc,
844 phba->fcf.current_rec.fcf_indx);
845 else
846 goto out;
847 }
848 } 816 }
849 817
850 /* FLOGI failure */ 818 /* FLOGI failure */
@@ -934,6 +902,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
934 lpfc_nlp_put(ndlp); 902 lpfc_nlp_put(ndlp);
935 spin_lock_irq(&phba->hbalock); 903 spin_lock_irq(&phba->hbalock);
936 phba->fcf.fcf_flag &= ~FCF_DISCOVERY; 904 phba->fcf.fcf_flag &= ~FCF_DISCOVERY;
905 phba->hba_flag &= ~(FCF_RR_INPROG | HBA_DEVLOSS_TMO);
937 spin_unlock_irq(&phba->hbalock); 906 spin_unlock_irq(&phba->hbalock);
938 goto out; 907 goto out;
939 } 908 }
@@ -942,13 +911,12 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
942 if (phba->hba_flag & HBA_FIP_SUPPORT) 911 if (phba->hba_flag & HBA_FIP_SUPPORT)
943 lpfc_printf_vlog(vport, KERN_INFO, LOG_FIP | 912 lpfc_printf_vlog(vport, KERN_INFO, LOG_FIP |
944 LOG_ELS, 913 LOG_ELS,
945 "2769 FLOGI successful on FCF " 914 "2769 FLOGI to FCF (x%x) "
946 "record: current_fcf_index:" 915 "completed successfully\n",
947 "x%x, terminate FCF round "
948 "robin failover process\n",
949 phba->fcf.current_rec.fcf_indx); 916 phba->fcf.current_rec.fcf_indx);
950 spin_lock_irq(&phba->hbalock); 917 spin_lock_irq(&phba->hbalock);
951 phba->fcf.fcf_flag &= ~FCF_DISCOVERY; 918 phba->fcf.fcf_flag &= ~FCF_DISCOVERY;
919 phba->hba_flag &= ~(FCF_RR_INPROG | HBA_DEVLOSS_TMO);
952 spin_unlock_irq(&phba->hbalock); 920 spin_unlock_irq(&phba->hbalock);
953 goto out; 921 goto out;
954 } 922 }