aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-02-26 14:15:29 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 08:39:52 -0500
commitfc2b989be9190f3311a5ae41289828e24897a20e (patch)
tree86de4a9129f003697819af1e5aa5d83eae683b4b /drivers/scsi/lpfc/lpfc_sli.c
parente2aed29f29d0d289df3b0b627b122832d4dc80fe (diff)
[SCSI] 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 <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c54
1 files changed, 49 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 9feeaff47a52..bb6a4426d469 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4519,6 +4519,10 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
4519 /* Post receive buffers to the device */ 4519 /* Post receive buffers to the device */
4520 lpfc_sli4_rb_setup(phba); 4520 lpfc_sli4_rb_setup(phba);
4521 4521
4522 /* Reset HBA FCF states after HBA reset */
4523 phba->fcf.fcf_flag = 0;
4524 phba->fcf.current_rec.flag = 0;
4525
4522 /* Start the ELS watchdog timer */ 4526 /* Start the ELS watchdog timer */
4523 mod_timer(&vport->els_tmofunc, 4527 mod_timer(&vport->els_tmofunc,
4524 jiffies + HZ * (phba->fc_ratov * 2)); 4528 jiffies + HZ * (phba->fc_ratov * 2));
@@ -12069,11 +12073,26 @@ lpfc_mbx_cmpl_redisc_fcf_table(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
12069 "2746 Requesting for FCF rediscovery failed " 12073 "2746 Requesting for FCF rediscovery failed "
12070 "status x%x add_status x%x\n", 12074 "status x%x add_status x%x\n",
12071 shdr_status, shdr_add_status); 12075 shdr_status, shdr_add_status);
12072 /* 12076 if (phba->fcf.fcf_flag & FCF_CVL_FOVER) {
12073 * Request failed, last resort to re-try current 12077 spin_lock_irq(&phba->hbalock);
12074 * registered FCF entry 12078 phba->fcf.fcf_flag &= ~FCF_CVL_FOVER;
12075 */ 12079 spin_unlock_irq(&phba->hbalock);
12076 lpfc_retry_pport_discovery(phba); 12080 /*
12081 * CVL event triggered FCF rediscover request failed,
12082 * last resort to re-try current registered FCF entry.
12083 */
12084 lpfc_retry_pport_discovery(phba);
12085 } else {
12086 spin_lock_irq(&phba->hbalock);
12087 phba->fcf.fcf_flag &= ~FCF_DEAD_FOVER;
12088 spin_unlock_irq(&phba->hbalock);
12089 /*
12090 * DEAD FCF event triggered FCF rediscover request
12091 * failed, last resort to fail over as a link down
12092 * to FCF registration.
12093 */
12094 lpfc_sli4_fcf_dead_failthrough(phba);
12095 }
12077 } else 12096 } else
12078 /* 12097 /*
12079 * Start FCF rediscovery wait timer for pending FCF 12098 * Start FCF rediscovery wait timer for pending FCF
@@ -12129,6 +12148,31 @@ lpfc_sli4_redisc_fcf_table(struct lpfc_hba *phba)
12129} 12148}
12130 12149
12131/** 12150/**
12151 * lpfc_sli4_fcf_dead_failthrough - Failthrough routine to fcf dead event
12152 * @phba: pointer to lpfc hba data structure.
12153 *
12154 * This function is the failover routine as a last resort to the FCF DEAD
12155 * event when driver failed to perform fast FCF failover.
12156 **/
12157void
12158lpfc_sli4_fcf_dead_failthrough(struct lpfc_hba *phba)
12159{
12160 uint32_t link_state;
12161
12162 /*
12163 * Last resort as FCF DEAD event failover will treat this as
12164 * a link down, but save the link state because we don't want
12165 * it to be changed to Link Down unless it is already down.
12166 */
12167 link_state = phba->link_state;
12168 lpfc_linkdown(phba);
12169 phba->link_state = link_state;
12170
12171 /* Unregister FCF if no devices connected to it */
12172 lpfc_unregister_unused_fcf(phba);
12173}
12174
12175/**
12132 * lpfc_sli_read_link_ste - Read region 23 to decide if link is disabled. 12176 * lpfc_sli_read_link_ste - Read region 23 to decide if link is disabled.
12133 * @phba: pointer to lpfc hba data structure. 12177 * @phba: pointer to lpfc hba data structure.
12134 * 12178 *