Commit dbb6b3ab authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.14: FCoE Discovery Fixes

- Prevent unregistring of unused FCF when FLOGI is pending.
- Prevent point to point discovery on a FCoE HBA.
- Fixed FCF discovery failure after swapping FCoE port by
  switching over to fast failover method when no FCF matches in-use FCF.
Signed-off-by: default avatarAlex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 75baf696
......@@ -796,7 +796,9 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
* due to new FCF discovery
*/
if ((phba->hba_flag & HBA_FIP_SUPPORT) &&
(phba->fcf.fcf_flag & FCF_DISCOVERY)) {
(phba->fcf.fcf_flag & FCF_DISCOVERY) &&
(irsp->ulpStatus != IOSTAT_LOCAL_REJECT) &&
(irsp->un.ulpWord[4] != IOERR_SLI_ABORTED)) {
lpfc_printf_log(phba, KERN_WARNING, LOG_FIP | LOG_ELS,
"2611 FLOGI failed on registered "
"FCF record fcf_index:%d, trying "
......@@ -890,9 +892,39 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
*/
if (sp->cmn.fPort)
rc = lpfc_cmpl_els_flogi_fabric(vport, ndlp, sp, irsp);
else
else if (!(phba->hba_flag & HBA_FCOE_SUPPORT))
rc = lpfc_cmpl_els_flogi_nport(vport, ndlp, sp);
else {
lpfc_printf_vlog(vport, KERN_ERR,
LOG_FIP | LOG_ELS,
"2831 FLOGI response with cleared Fabric "
"bit fcf_index 0x%x "
"Switch Name %02x%02x%02x%02x%02x%02x%02x%02x "
"Fabric Name "
"%02x%02x%02x%02x%02x%02x%02x%02x\n",
phba->fcf.current_rec.fcf_indx,
phba->fcf.current_rec.switch_name[0],
phba->fcf.current_rec.switch_name[1],
phba->fcf.current_rec.switch_name[2],
phba->fcf.current_rec.switch_name[3],
phba->fcf.current_rec.switch_name[4],
phba->fcf.current_rec.switch_name[5],
phba->fcf.current_rec.switch_name[6],
phba->fcf.current_rec.switch_name[7],
phba->fcf.current_rec.fabric_name[0],
phba->fcf.current_rec.fabric_name[1],
phba->fcf.current_rec.fabric_name[2],
phba->fcf.current_rec.fabric_name[3],
phba->fcf.current_rec.fabric_name[4],
phba->fcf.current_rec.fabric_name[5],
phba->fcf.current_rec.fabric_name[6],
phba->fcf.current_rec.fabric_name[7]);
lpfc_nlp_put(ndlp);
spin_lock_irq(&phba->hbalock);
phba->fcf.fcf_flag &= ~FCF_DISCOVERY;
spin_unlock_irq(&phba->hbalock);
goto out;
}
if (!rc) {
/* Mark the FCF discovery process done */
if (phba->hba_flag & HBA_FIP_SUPPORT)
......
This diff is collapsed.
......@@ -12404,7 +12404,8 @@ lpfc_sli4_fcf_rr_next_index_get(struct lpfc_hba *phba)
next_fcf_index = find_next_bit(phba->fcf.fcf_rr_bmask,
LPFC_SLI4_FCF_TBL_INDX_MAX, 0);
/* Round robin failover stop condition */
if (next_fcf_index == phba->fcf.fcf_rr_init_indx)
if ((next_fcf_index == phba->fcf.fcf_rr_init_indx) ||
(next_fcf_index >= LPFC_SLI4_FCF_TBL_INDX_MAX))
return LPFC_FCOE_FCF_NEXT_NONE;
return next_fcf_index;
......
......@@ -51,6 +51,9 @@
#define LPFC_FCOE_FCF_GET_FIRST 0xFFFF
#define LPFC_FCOE_FCF_NEXT_NONE 0xFFFF
#define LPFC_FCOE_NULL_VID 0xFFF
#define LPFC_FCOE_IGNORE_VID 0xFFFF
/* First 3 bytes of default FCF MAC is specified by FC_MAP */
#define LPFC_FCOE_FCF_MAC3 0xFF
#define LPFC_FCOE_FCF_MAC4 0xFF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment