aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.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_hbadisc.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_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index e58d8aeec09e..f28ce40dc349 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1504,7 +1504,9 @@ lpfc_check_pending_fcoe_event(struct lpfc_hba *phba, uint8_t unreg_fcf)
1504 */ 1504 */
1505 spin_lock_irq(&phba->hbalock); 1505 spin_lock_irq(&phba->hbalock);
1506 phba->hba_flag &= ~FCF_DISC_INPROGRESS; 1506 phba->hba_flag &= ~FCF_DISC_INPROGRESS;
1507 phba->fcf.fcf_flag &= ~FCF_REDISC_FOV; 1507 phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV |
1508 FCF_DEAD_FOVER |
1509 FCF_CVL_FOVER);
1508 spin_unlock_irq(&phba->hbalock); 1510 spin_unlock_irq(&phba->hbalock);
1509 } 1511 }
1510 1512
@@ -1649,7 +1651,9 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
1649 __lpfc_sli4_stop_fcf_redisc_wait_timer(phba); 1651 __lpfc_sli4_stop_fcf_redisc_wait_timer(phba);
1650 else if (phba->fcf.fcf_flag & FCF_REDISC_FOV) 1652 else if (phba->fcf.fcf_flag & FCF_REDISC_FOV)
1651 /* If in fast failover, mark it's completed */ 1653 /* If in fast failover, mark it's completed */
1652 phba->fcf.fcf_flag &= ~FCF_REDISC_FOV; 1654 phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV |
1655 FCF_DEAD_FOVER |
1656 FCF_CVL_FOVER);
1653 spin_unlock_irqrestore(&phba->hbalock, iflags); 1657 spin_unlock_irqrestore(&phba->hbalock, iflags);
1654 goto out; 1658 goto out;
1655 } 1659 }
@@ -1669,14 +1673,9 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
1669 * Update on failover FCF record only if it's in FCF fast-failover 1673 * Update on failover FCF record only if it's in FCF fast-failover
1670 * period; otherwise, update on current FCF record. 1674 * period; otherwise, update on current FCF record.
1671 */ 1675 */
1672 if (phba->fcf.fcf_flag & FCF_REDISC_FOV) { 1676 if (phba->fcf.fcf_flag & FCF_REDISC_FOV)
1673 /* Fast FCF failover only to the same fabric name */ 1677 fcf_rec = &phba->fcf.failover_rec;
1674 if (lpfc_fab_name_match(phba->fcf.current_rec.fabric_name, 1678 else
1675 new_fcf_record))
1676 fcf_rec = &phba->fcf.failover_rec;
1677 else
1678 goto read_next_fcf;
1679 } else
1680 fcf_rec = &phba->fcf.current_rec; 1679 fcf_rec = &phba->fcf.current_rec;
1681 1680
1682 if (phba->fcf.fcf_flag & FCF_AVAILABLE) { 1681 if (phba->fcf.fcf_flag & FCF_AVAILABLE) {
@@ -1705,8 +1704,7 @@ lpfc_mbx_cmpl_read_fcf_record(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
1705 * If the new hba FCF record has lower priority value 1704 * If the new hba FCF record has lower priority value
1706 * than the driver FCF record, use the new record. 1705 * than the driver FCF record, use the new record.
1707 */ 1706 */
1708 if (lpfc_fab_name_match(fcf_rec->fabric_name, new_fcf_record) && 1707 if (new_fcf_record->fip_priority < fcf_rec->priority) {
1709 (new_fcf_record->fip_priority < fcf_rec->priority)) {
1710 /* Choose this FCF record */ 1708 /* Choose this FCF record */
1711 __lpfc_update_fcf_record(phba, fcf_rec, new_fcf_record, 1709 __lpfc_update_fcf_record(phba, fcf_rec, new_fcf_record,
1712 addr_mode, vlan_id, 0); 1710 addr_mode, vlan_id, 0);
@@ -1762,7 +1760,9 @@ read_next_fcf:
1762 sizeof(struct lpfc_fcf_rec)); 1760 sizeof(struct lpfc_fcf_rec));
1763 /* mark the FCF fast failover completed */ 1761 /* mark the FCF fast failover completed */
1764 spin_lock_irqsave(&phba->hbalock, iflags); 1762 spin_lock_irqsave(&phba->hbalock, iflags);
1765 phba->fcf.fcf_flag &= ~FCF_REDISC_FOV; 1763 phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV |
1764 FCF_DEAD_FOVER |
1765 FCF_CVL_FOVER);
1766 spin_unlock_irqrestore(&phba->hbalock, iflags); 1766 spin_unlock_irqrestore(&phba->hbalock, iflags);
1767 /* Register to the new FCF record */ 1767 /* Register to the new FCF record */
1768 lpfc_register_fcf(phba); 1768 lpfc_register_fcf(phba);
@@ -4760,6 +4760,7 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba)
4760 return; 4760 return;
4761 /* Reset HBA FCF states after successful unregister FCF */ 4761 /* Reset HBA FCF states after successful unregister FCF */
4762 phba->fcf.fcf_flag = 0; 4762 phba->fcf.fcf_flag = 0;
4763 phba->fcf.current_rec.flag = 0;
4763 4764
4764 /* 4765 /*
4765 * If driver is not unloading, check if there is any other 4766 * If driver is not unloading, check if there is any other