lpfc 8.3.10: Fix Discovery issues
Subsystems (2)
PATCH 5/7 lpfc 8.3.10: Fix Discovery issues
- Prevent Vport discovery after reg_new_vport completes when physical logged in using FDISC.
- Remove fast FCF failover fabric name matching. Allow failover to FCFs connected to different fabrics.
- Added fast FCF failover in response to FCF DEAD event on current FCF record.
Signed-off-by James Smart <[email protected]>
---
lpfc_crtn.h | 1 lpfc_els.c | 7 ++ lpfc_hbadisc.c | 27 +++++----- lpfc_init.c | 140 +++++++++++++++++++++++++++++++++++++++++++++------------ lpfc_sli.c | 54 +++++++++++++++++++-- lpfc_sli4.h | 8 ++- 6 files changed, 186 insertions(+), 51 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +1 -0
@@ -221,6 +221,7 @@ void lpfc_unregister_fcf_rescan(struct lvoid lpfc_unregister_unused_fcf (struct lpfc_hba *);int lpfc_sli4_redisc_fcf_table (struct lpfc_hba *);void lpfc_fcf_redisc_wait_start_timer (struct lpfc_hba *); +void lpfc_sli4_fcf_dead_failthrough (struct lpfc_hba *);int lpfc_mem_alloc (struct lpfc_hba *,int align);void lpfc_mem_free (struct lpfc_hba *);
drivers/scsi/lpfc/lpfc_els.c +6 -1
@@ -6004,7 +6004,12 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hbaif (phba->sli_rev <LPFC_SLI_REV4 )lpfc_issue_fabric_reglogin (vport);else { -lpfc_start_fdiscs (phba); +/* +* If the physical port is instantiated using +* FDISC, do not start vport discovery. +*/ +if (vport->port_state !=LPFC_FDISC ) +lpfc_start_fdiscs (phba);lpfc_do_scr_ns_plogi (phba, vport); } }else
drivers/scsi/lpfc/lpfc_hbadisc.c +14 -13
@@ -1504,7 +1504,9 @@ lpfc_check_pending_fcoe_event(struct lpf*/ spin_lock_irq (&phba->hbalock); phba->hba_flag &= ~FCF_DISC_INPROGRESS ; - phba->fcf.fcf_flag &= ~FCF_REDISC_FOV ; + phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV | +FCF_DEAD_FOVER | +FCF_CVL_FOVER );spin_unlock_irq (&phba->hbalock); }
@@ -1649,7 +1651,9 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpf__lpfc_sli4_stop_fcf_redisc_wait_timer (phba); else if (phba->fcf.fcf_flag & FCF_REDISC_FOV) /* If in fast failover, mark it's completed */ - phba->fcf.fcf_flag &= ~FCF_REDISC_FOV; + phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV | +FCF_DEAD_FOVER | +FCF_CVL_FOVER );spin_unlock_irqrestore (&phba->hbalock, iflags); goto out; }
@@ -1669,14 +1673,9 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpf* Update on failover FCF record only if it's in FCF fast-failover * period; otherwise, update on current FCF record. */ -if (phba->fcf.fcf_flag &FCF_REDISC_FOV ) { -/* Fast FCF failover only to the same fabric name */ -if (lpfc_fab_name_match (phba->fcf.current_rec.fabric_name, - new_fcf_record)) - fcf_rec = &phba->fcf.failover_rec; -else - goto read_next_fcf; - }else +if (phba->fcf.fcf_flag &FCF_REDISC_FOV ) + fcf_rec = &phba->fcf.failover_rec; +else fcf_rec = &phba->fcf.current_rec;if (phba->fcf.fcf_flag &FCF_AVAILABLE ) {
@@ -1705,8 +1704,7 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpf* If the new hba FCF record has lower priority value * than the driver FCF record, use the new record. */ -if (lpfc_fab_name_match (fcf_rec->fabric_name, new_fcf_record) && - (new_fcf_record->fip_priority < fcf_rec->priority)) { +if (new_fcf_record->fip_priority < fcf_rec->priority) {/* Choose this FCF record */ __lpfc_update_fcf_record (phba, fcf_rec, new_fcf_record, addr_mode, vlan_id,0 );
@@ -1762,7 +1760,9 @@ read_next_fcf: sizeof(struct lpfc_fcf_rec));/* mark the FCF fast failover completed */ spin_lock_irqsave (&phba->hbalock, iflags); - phba->fcf.fcf_flag &= ~FCF_REDISC_FOV ; + phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV | +FCF_DEAD_FOVER | +FCF_CVL_FOVER );spin_unlock_irqrestore (&phba->hbalock, iflags);/* Register to the new FCF record */ lpfc_register_fcf (phba);
@@ -4760,6 +4760,7 @@ lpfc_unregister_fcf_rescan(struct lpfc_hreturn ;/* Reset HBA FCF states after successful unregister FCF */ phba->fcf.fcf_flag =0 ; + phba->fcf.current_rec.flag =0 ;/* * If driver is not unloading, check if there is any other
drivers/scsi/lpfc/lpfc_init.c +111 -29
192 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_sli4.h +5 -3
@@ -153,9 +153,11 @@ struct lpfc_fcf {#define FCF_REGISTERED 0x02/* FCF registered with FW */ #define FCF_SCAN_DONE 0x04/* FCF table scan done */ #define FCF_IN_USE 0x08/* Atleast one discovery completed */ -#define FCF_REDISC_PEND 0x10/* FCF rediscovery pending */ -#define FCF_REDISC_EVT 0x20/* FCF rediscovery event to worker thread */ -#define FCF_REDISC_FOV 0x40/* Post FCF rediscovery fast failover */ +#define FCF_DEAD_FOVER 0x10/* FCF DEAD triggered fast FCF failover */ +#define FCF_CVL_FOVER 0x20/* CVL triggered fast FCF failover */ +#define FCF_REDISC_PEND 0x40/* FCF rediscovery pending */ +#define FCF_REDISC_EVT 0x80/* FCF rediscovery event to worker thread */ +#define FCF_REDISC_FOV 0x100/* Post FCF rediscovery fast failover */ uint32_t addr_mode;struct lpfc_fcf_rec current_rec;struct lpfc_fcf_rec failover_rec;
drivers/scsi/lpfc/lpfc_sli.c +49 -5
72 lines not on this page · raw message