[SCSI] lpfc 8.3.7: Fix discovery failures.
Fix discovery failures: - Move all accesses to the fc_flag field inside the host lock. - Restore link state after going through linkdown processing for FCF DEAD event. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:

committed by
James Bottomley

parent
aacc20e35e
commit
9795724476
@@ -1708,7 +1708,9 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
return;
|
||||
}
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
vport->fc_flag &= ~FC_VPORT_NEEDS_INIT_VPI;
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
|
||||
if (phba->link_flag & LS_NPIV_FAB_SUPPORTED)
|
||||
lpfc_initial_fdisc(vport);
|
||||
@@ -2269,8 +2271,10 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
||||
mb->mbxStatus);
|
||||
break;
|
||||
}
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
vport->vpi_state &= ~LPFC_VPI_REGISTERED;
|
||||
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
vport->unreg_vpi_cmpl = VPORT_OK;
|
||||
mempool_free(pmb, phba->mbox_mem_pool);
|
||||
/*
|
||||
@@ -4486,8 +4490,10 @@ lpfc_unregister_unused_fcf(struct lpfc_hba *phba)
|
||||
(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED))
|
||||
for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
|
||||
lpfc_mbx_unreg_vpi(vports[i]);
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
vports[i]->fc_flag |= FC_VPORT_NEEDS_INIT_VPI;
|
||||
vports[i]->vpi_state &= ~LPFC_VPI_REGISTERED;
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
}
|
||||
lpfc_destroy_vport_work_array(phba, vports);
|
||||
|
||||
|
Reference in New Issue
Block a user