diff options
author | James Smart <james.smart@emulex.com> | 2010-08-04 16:11:39 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-08-06 13:11:44 -0400 |
commit | 38b92ef89b0d5a255f2f812c623fcdec4e63a21c (patch) | |
tree | 974498b393ebc3ef8ac67dcb2b2969e58c2b32ca /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | bc73905abf7701920fe687564ecd3c6b316b9a2e (diff) |
[SCSI] lpfc 8.3.16: FCoE Discovery and Failover Fixes
- Add support for re-reg'ing changed VPI w/o unregister VPI
- Copy WWN and state from old nodelist when target DID change.
- Clean up old nodelist rport and put the nodelist when target DID change.
- Clear the VFI_REGISTERED flag when UNREG_VFI completes.
- Made both checks of port_state against LPFC_FLOGI and LPFC_FDISC
non-inclusive for ignoring CVL events.
- Added logic to stop retrying of the ongoing PLOGI and FDISC if
transitioned back to the FCF rediscovery state in reaction to CVL.
- Removed the dependency of scanning of all the available FCF table
entries for bulding round-robin bitmap.
- Use the lpfc_sli4_fcf_rr_read_fcf_rec() in responding to
individual New FCF found event.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
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.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index efba65b368a8..1f62ea8c165d 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1852,8 +1852,7 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | |||
1852 | __lpfc_sli4_stop_fcf_redisc_wait_timer(phba); | 1852 | __lpfc_sli4_stop_fcf_redisc_wait_timer(phba); |
1853 | else if (phba->fcf.fcf_flag & FCF_REDISC_FOV) | 1853 | else if (phba->fcf.fcf_flag & FCF_REDISC_FOV) |
1854 | /* If in fast failover, mark it's completed */ | 1854 | /* If in fast failover, mark it's completed */ |
1855 | phba->fcf.fcf_flag &= ~(FCF_REDISC_FOV | | 1855 | phba->fcf.fcf_flag &= ~FCF_REDISC_FOV; |
1856 | FCF_DISCOVERY); | ||
1857 | spin_unlock_irq(&phba->hbalock); | 1856 | spin_unlock_irq(&phba->hbalock); |
1858 | lpfc_printf_log(phba, KERN_INFO, LOG_FIP, | 1857 | lpfc_printf_log(phba, KERN_INFO, LOG_FIP, |
1859 | "2836 The new FCF record (x%x) " | 1858 | "2836 The new FCF record (x%x) " |
@@ -2651,7 +2650,6 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) | |||
2651 | spin_unlock_irq(&phba->hbalock); | 2650 | spin_unlock_irq(&phba->hbalock); |
2652 | lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY, | 2651 | lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY, |
2653 | "2778 Start FCF table scan at linkup\n"); | 2652 | "2778 Start FCF table scan at linkup\n"); |
2654 | |||
2655 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, | 2653 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, |
2656 | LPFC_FCOE_FCF_GET_FIRST); | 2654 | LPFC_FCOE_FCF_GET_FIRST); |
2657 | if (rc) { | 2655 | if (rc) { |
@@ -2660,6 +2658,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) | |||
2660 | spin_unlock_irq(&phba->hbalock); | 2658 | spin_unlock_irq(&phba->hbalock); |
2661 | goto out; | 2659 | goto out; |
2662 | } | 2660 | } |
2661 | /* Reset FCF roundrobin bmask for new discovery */ | ||
2662 | memset(phba->fcf.fcf_rr_bmask, 0, | ||
2663 | sizeof(*phba->fcf.fcf_rr_bmask)); | ||
2663 | } | 2664 | } |
2664 | 2665 | ||
2665 | return; | 2666 | return; |
@@ -5097,6 +5098,7 @@ static void | |||
5097 | lpfc_unregister_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | 5098 | lpfc_unregister_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) |
5098 | { | 5099 | { |
5099 | struct lpfc_vport *vport = mboxq->vport; | 5100 | struct lpfc_vport *vport = mboxq->vport; |
5101 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | ||
5100 | 5102 | ||
5101 | if (mboxq->u.mb.mbxStatus) { | 5103 | if (mboxq->u.mb.mbxStatus) { |
5102 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 5104 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, |
@@ -5104,6 +5106,9 @@ lpfc_unregister_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) | |||
5104 | "HBA state x%x\n", | 5106 | "HBA state x%x\n", |
5105 | mboxq->u.mb.mbxStatus, vport->port_state); | 5107 | mboxq->u.mb.mbxStatus, vport->port_state); |
5106 | } | 5108 | } |
5109 | spin_lock_irq(shost->host_lock); | ||
5110 | phba->pport->fc_flag &= ~FC_VFI_REGISTERED; | ||
5111 | spin_unlock_irq(shost->host_lock); | ||
5107 | mempool_free(mboxq, phba->mbox_mem_pool); | 5112 | mempool_free(mboxq, phba->mbox_mem_pool); |
5108 | return; | 5113 | return; |
5109 | } | 5114 | } |
@@ -5285,6 +5290,10 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba) | |||
5285 | spin_lock_irq(&phba->hbalock); | 5290 | spin_lock_irq(&phba->hbalock); |
5286 | phba->fcf.fcf_flag |= FCF_INIT_DISC; | 5291 | phba->fcf.fcf_flag |= FCF_INIT_DISC; |
5287 | spin_unlock_irq(&phba->hbalock); | 5292 | spin_unlock_irq(&phba->hbalock); |
5293 | |||
5294 | /* Reset FCF roundrobin bmask for new discovery */ | ||
5295 | memset(phba->fcf.fcf_rr_bmask, 0, sizeof(*phba->fcf.fcf_rr_bmask)); | ||
5296 | |||
5288 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST); | 5297 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST); |
5289 | 5298 | ||
5290 | if (rc) { | 5299 | if (rc) { |