diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 5fbdb22c189..c4c7f0ad746 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -584,6 +584,7 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
584 | spin_unlock_irq(shost->host_lock); | 584 | spin_unlock_irq(shost->host_lock); |
585 | lpfc_unreg_rpi(vport, np); | 585 | lpfc_unreg_rpi(vport, np); |
586 | } | 586 | } |
587 | lpfc_cleanup_pending_mbox(vport); | ||
587 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { | 588 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { |
588 | lpfc_mbx_unreg_vpi(vport); | 589 | lpfc_mbx_unreg_vpi(vport); |
589 | spin_lock_irq(shost->host_lock); | 590 | spin_lock_irq(shost->host_lock); |
@@ -864,6 +865,7 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
864 | } | 865 | } |
865 | spin_lock_irq(shost->host_lock); | 866 | spin_lock_irq(shost->host_lock); |
866 | vport->fc_flag &= ~FC_VPORT_CVL_RCVD; | 867 | vport->fc_flag &= ~FC_VPORT_CVL_RCVD; |
868 | vport->fc_flag &= ~FC_VPORT_LOGO_RCVD; | ||
867 | spin_unlock_irq(shost->host_lock); | 869 | spin_unlock_irq(shost->host_lock); |
868 | 870 | ||
869 | /* | 871 | /* |
@@ -893,11 +895,14 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
893 | 895 | ||
894 | if (!rc) { | 896 | if (!rc) { |
895 | /* Mark the FCF discovery process done */ | 897 | /* Mark the FCF discovery process done */ |
896 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FIP | LOG_ELS, | 898 | if (phba->hba_flag & HBA_FIP_SUPPORT) |
897 | "2769 FLOGI successful on FCF record: " | 899 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FIP | |
898 | "current_fcf_index:x%x, terminate FCF " | 900 | LOG_ELS, |
899 | "round robin failover process\n", | 901 | "2769 FLOGI successful on FCF " |
900 | phba->fcf.current_rec.fcf_indx); | 902 | "record: current_fcf_index:" |
903 | "x%x, terminate FCF round " | ||
904 | "robin failover process\n", | ||
905 | phba->fcf.current_rec.fcf_indx); | ||
901 | spin_lock_irq(&phba->hbalock); | 906 | spin_lock_irq(&phba->hbalock); |
902 | phba->fcf.fcf_flag &= ~FCF_DISCOVERY; | 907 | phba->fcf.fcf_flag &= ~FCF_DISCOVERY; |
903 | spin_unlock_irq(&phba->hbalock); | 908 | spin_unlock_irq(&phba->hbalock); |
@@ -5366,7 +5371,7 @@ lpfc_send_els_failure_event(struct lpfc_hba *phba, | |||
5366 | sizeof(struct lpfc_name)); | 5371 | sizeof(struct lpfc_name)); |
5367 | pcmd = (uint32_t *) (((struct lpfc_dmabuf *) | 5372 | pcmd = (uint32_t *) (((struct lpfc_dmabuf *) |
5368 | cmdiocbp->context2)->virt); | 5373 | cmdiocbp->context2)->virt); |
5369 | lsrjt_event.command = *pcmd; | 5374 | lsrjt_event.command = (pcmd != NULL) ? *pcmd : 0; |
5370 | stat.un.lsRjtError = be32_to_cpu(rspiocbp->iocb.un.ulpWord[4]); | 5375 | stat.un.lsRjtError = be32_to_cpu(rspiocbp->iocb.un.ulpWord[4]); |
5371 | lsrjt_event.reason_code = stat.un.b.lsRjtRsnCode; | 5376 | lsrjt_event.reason_code = stat.un.b.lsRjtRsnCode; |
5372 | lsrjt_event.explanation = stat.un.b.lsRjtRsnCodeExp; | 5377 | lsrjt_event.explanation = stat.un.b.lsRjtRsnCodeExp; |
@@ -6050,7 +6055,8 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
6050 | spin_lock_irq(shost->host_lock); | 6055 | spin_lock_irq(shost->host_lock); |
6051 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; | 6056 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; |
6052 | spin_unlock_irq(shost->host_lock); | 6057 | spin_unlock_irq(shost->host_lock); |
6053 | if (vport->port_type == LPFC_PHYSICAL_PORT) | 6058 | if (vport->port_type == LPFC_PHYSICAL_PORT |
6059 | && !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG)) | ||
6054 | lpfc_initial_flogi(vport); | 6060 | lpfc_initial_flogi(vport); |
6055 | else | 6061 | else |
6056 | lpfc_initial_fdisc(vport); | 6062 | lpfc_initial_fdisc(vport); |
@@ -6286,6 +6292,7 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
6286 | } | 6292 | } |
6287 | spin_lock_irq(shost->host_lock); | 6293 | spin_lock_irq(shost->host_lock); |
6288 | vport->fc_flag &= ~FC_VPORT_CVL_RCVD; | 6294 | vport->fc_flag &= ~FC_VPORT_CVL_RCVD; |
6295 | vport->fc_flag &= ~FC_VPORT_LOGO_RCVD; | ||
6289 | vport->fc_flag |= FC_FABRIC; | 6296 | vport->fc_flag |= FC_FABRIC; |
6290 | if (vport->phba->fc_topology == TOPOLOGY_LOOP) | 6297 | if (vport->phba->fc_topology == TOPOLOGY_LOOP) |
6291 | vport->fc_flag |= FC_PUBLIC_LOOP; | 6298 | vport->fc_flag |= FC_PUBLIC_LOOP; |
@@ -6310,11 +6317,14 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
6310 | spin_unlock_irq(shost->host_lock); | 6317 | spin_unlock_irq(shost->host_lock); |
6311 | lpfc_unreg_rpi(vport, np); | 6318 | lpfc_unreg_rpi(vport, np); |
6312 | } | 6319 | } |
6320 | lpfc_cleanup_pending_mbox(vport); | ||
6313 | lpfc_mbx_unreg_vpi(vport); | 6321 | lpfc_mbx_unreg_vpi(vport); |
6314 | spin_lock_irq(shost->host_lock); | 6322 | spin_lock_irq(shost->host_lock); |
6315 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; | 6323 | vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; |
6316 | if (phba->sli_rev == LPFC_SLI_REV4) | 6324 | if (phba->sli_rev == LPFC_SLI_REV4) |
6317 | vport->fc_flag |= FC_VPORT_NEEDS_INIT_VPI; | 6325 | vport->fc_flag |= FC_VPORT_NEEDS_INIT_VPI; |
6326 | else | ||
6327 | vport->fc_flag |= FC_LOGO_RCVD_DID_CHNG; | ||
6318 | spin_unlock_irq(shost->host_lock); | 6328 | spin_unlock_irq(shost->host_lock); |
6319 | } | 6329 | } |
6320 | 6330 | ||