diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-07-19 10:01:21 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:51:58 -0400 |
commit | 32b9793fe6ff09a85f36b8bd7d6ff214653a7497 (patch) | |
tree | e4bfaf3c28982f9e9b2555ba06dc780e7cb70dca /drivers/scsi/lpfc/lpfc_init.c | |
parent | 8568a4d2495ebcf5da38a2141c7633399143b1a5 (diff) |
[SCSI] lpfc 8.3.4: Fix a pair of FCoE issues
Fix a pair of FCoE issues
- Fix Region 23 FCoE Parameters not being read correctly
- Fix race condition when there are FCoE events during FCF table read
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index dc561e3c8b92..a7f32ed256bd 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -2829,6 +2829,7 @@ lpfc_sli4_async_link_evt(struct lpfc_hba *phba, | |||
2829 | att_type = lpfc_sli4_parse_latt_type(phba, acqe_link); | 2829 | att_type = lpfc_sli4_parse_latt_type(phba, acqe_link); |
2830 | if (att_type != AT_LINK_DOWN && att_type != AT_LINK_UP) | 2830 | if (att_type != AT_LINK_DOWN && att_type != AT_LINK_UP) |
2831 | return; | 2831 | return; |
2832 | phba->fcoe_eventtag = acqe_link->event_tag; | ||
2832 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 2833 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
2833 | if (!pmb) { | 2834 | if (!pmb) { |
2834 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 2835 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
@@ -2916,6 +2917,7 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, | |||
2916 | uint8_t event_type = bf_get(lpfc_acqe_fcoe_event_type, acqe_fcoe); | 2917 | uint8_t event_type = bf_get(lpfc_acqe_fcoe_event_type, acqe_fcoe); |
2917 | int rc; | 2918 | int rc; |
2918 | 2919 | ||
2920 | phba->fcoe_eventtag = acqe_fcoe->event_tag; | ||
2919 | switch (event_type) { | 2921 | switch (event_type) { |
2920 | case LPFC_FCOE_EVENT_TYPE_NEW_FCF: | 2922 | case LPFC_FCOE_EVENT_TYPE_NEW_FCF: |
2921 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2923 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, |
@@ -2923,11 +2925,12 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba, | |||
2923 | acqe_fcoe->fcf_index, | 2925 | acqe_fcoe->fcf_index, |
2924 | acqe_fcoe->event_tag); | 2926 | acqe_fcoe->event_tag); |
2925 | /* | 2927 | /* |
2926 | * If the current FCF is in discovered state, | 2928 | * If the current FCF is in discovered state, or |
2927 | * do nothing. | 2929 | * FCF discovery is in progress do nothing. |
2928 | */ | 2930 | */ |
2929 | spin_lock_irq(&phba->hbalock); | 2931 | spin_lock_irq(&phba->hbalock); |
2930 | if (phba->fcf.fcf_flag & FCF_DISCOVERED) { | 2932 | if ((phba->fcf.fcf_flag & FCF_DISCOVERED) || |
2933 | (phba->hba_flag & FCF_DISC_INPROGRESS)) { | ||
2931 | spin_unlock_irq(&phba->hbalock); | 2934 | spin_unlock_irq(&phba->hbalock); |
2932 | break; | 2935 | break; |
2933 | } | 2936 | } |