aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 9a2e2c792876..814d0b324d70 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2936,8 +2936,7 @@ lpfc_sli4_fcf_redisc_wait_tmo(unsigned long ptr)
2936 phba->fcf.fcf_flag |= FCF_REDISC_EVT; 2936 phba->fcf.fcf_flag |= FCF_REDISC_EVT;
2937 spin_unlock_irq(&phba->hbalock); 2937 spin_unlock_irq(&phba->hbalock);
2938 lpfc_printf_log(phba, KERN_INFO, LOG_FIP, 2938 lpfc_printf_log(phba, KERN_INFO, LOG_FIP,
2939 "2776 FCF rediscover wait timer expired, post " 2939 "2776 FCF rediscover quiescent timer expired\n");
2940 "a worker thread event for FCF table scan\n");
2941 /* wake up worker thread */ 2940 /* wake up worker thread */
2942 lpfc_worker_wake_up(phba); 2941 lpfc_worker_wake_up(phba);
2943} 2942}
@@ -3312,35 +3311,34 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
3312 if (event_type == LPFC_FCOE_EVENT_TYPE_NEW_FCF) 3311 if (event_type == LPFC_FCOE_EVENT_TYPE_NEW_FCF)
3313 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | 3312 lpfc_printf_log(phba, KERN_ERR, LOG_FIP |
3314 LOG_DISCOVERY, 3313 LOG_DISCOVERY,
3315 "2546 New FCF found event: " 3314 "2546 New FCF event, evt_tag:x%x, "
3316 "evt_tag:x%x, fcf_index:x%x\n", 3315 "index:x%x\n",
3317 acqe_fcoe->event_tag, 3316 acqe_fcoe->event_tag,
3318 acqe_fcoe->index); 3317 acqe_fcoe->index);
3319 else 3318 else
3320 lpfc_printf_log(phba, KERN_WARNING, LOG_FIP | 3319 lpfc_printf_log(phba, KERN_WARNING, LOG_FIP |
3321 LOG_DISCOVERY, 3320 LOG_DISCOVERY,
3322 "2788 FCF parameter modified event: " 3321 "2788 FCF param modified event, "
3323 "evt_tag:x%x, fcf_index:x%x\n", 3322 "evt_tag:x%x, index:x%x\n",
3324 acqe_fcoe->event_tag, 3323 acqe_fcoe->event_tag,
3325 acqe_fcoe->index); 3324 acqe_fcoe->index);
3326 if (phba->fcf.fcf_flag & FCF_DISCOVERY) { 3325 if (phba->fcf.fcf_flag & FCF_DISCOVERY) {
3327 /* 3326 /*
3328 * During period of FCF discovery, read the FCF 3327 * During period of FCF discovery, read the FCF
3329 * table record indexed by the event to update 3328 * table record indexed by the event to update
3330 * FCF round robin failover eligible FCF bmask. 3329 * FCF roundrobin failover eligible FCF bmask.
3331 */ 3330 */
3332 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | 3331 lpfc_printf_log(phba, KERN_INFO, LOG_FIP |
3333 LOG_DISCOVERY, 3332 LOG_DISCOVERY,
3334 "2779 Read new FCF record with " 3333 "2779 Read FCF (x%x) for updating "
3335 "fcf_index:x%x for updating FCF " 3334 "roundrobin FCF failover bmask\n",
3336 "round robin failover bmask\n",
3337 acqe_fcoe->index); 3335 acqe_fcoe->index);
3338 rc = lpfc_sli4_read_fcf_rec(phba, acqe_fcoe->index); 3336 rc = lpfc_sli4_read_fcf_rec(phba, acqe_fcoe->index);
3339 } 3337 }
3340 3338
3341 /* If the FCF discovery is in progress, do nothing. */ 3339 /* If the FCF discovery is in progress, do nothing. */
3342 spin_lock_irq(&phba->hbalock); 3340 spin_lock_irq(&phba->hbalock);
3343 if (phba->hba_flag & FCF_DISC_INPROGRESS) { 3341 if (phba->hba_flag & FCF_TS_INPROG) {
3344 spin_unlock_irq(&phba->hbalock); 3342 spin_unlock_irq(&phba->hbalock);
3345 break; 3343 break;
3346 } 3344 }
@@ -3359,15 +3357,15 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
3359 3357
3360 /* Otherwise, scan the entire FCF table and re-discover SAN */ 3358 /* Otherwise, scan the entire FCF table and re-discover SAN */
3361 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY, 3359 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY,
3362 "2770 Start FCF table scan due to new FCF " 3360 "2770 Start FCF table scan per async FCF "
3363 "event: evt_tag:x%x, fcf_index:x%x\n", 3361 "event, evt_tag:x%x, index:x%x\n",
3364 acqe_fcoe->event_tag, acqe_fcoe->index); 3362 acqe_fcoe->event_tag, acqe_fcoe->index);
3365 rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, 3363 rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba,
3366 LPFC_FCOE_FCF_GET_FIRST); 3364 LPFC_FCOE_FCF_GET_FIRST);
3367 if (rc) 3365 if (rc)
3368 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, 3366 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY,
3369 "2547 Issue FCF scan read FCF mailbox " 3367 "2547 Issue FCF scan read FCF mailbox "
3370 "command failed 0x%x\n", rc); 3368 "command failed (x%x)\n", rc);
3371 break; 3369 break;
3372 3370
3373 case LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL: 3371 case LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL:
@@ -3379,9 +3377,8 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
3379 3377
3380 case LPFC_FCOE_EVENT_TYPE_FCF_DEAD: 3378 case LPFC_FCOE_EVENT_TYPE_FCF_DEAD:
3381 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, 3379 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY,
3382 "2549 FCF disconnected from network index 0x%x" 3380 "2549 FCF (x%x) disconnected from network, "
3383 " tag 0x%x\n", acqe_fcoe->index, 3381 "tag:x%x\n", acqe_fcoe->index, acqe_fcoe->event_tag);
3384 acqe_fcoe->event_tag);
3385 /* 3382 /*
3386 * If we are in the middle of FCF failover process, clear 3383 * If we are in the middle of FCF failover process, clear
3387 * the corresponding FCF bit in the roundrobin bitmap. 3384 * the corresponding FCF bit in the roundrobin bitmap.
@@ -3495,9 +3492,8 @@ lpfc_sli4_async_fcoe_evt(struct lpfc_hba *phba,
3495 spin_unlock_irq(&phba->hbalock); 3492 spin_unlock_irq(&phba->hbalock);
3496 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | 3493 lpfc_printf_log(phba, KERN_INFO, LOG_FIP |
3497 LOG_DISCOVERY, 3494 LOG_DISCOVERY,
3498 "2773 Start FCF fast failover due " 3495 "2773 Start FCF failover per CVL, "
3499 "to CVL event: evt_tag:x%x\n", 3496 "evt_tag:x%x\n", acqe_fcoe->event_tag);
3500 acqe_fcoe->event_tag);
3501 rc = lpfc_sli4_redisc_fcf_table(phba); 3497 rc = lpfc_sli4_redisc_fcf_table(phba);
3502 if (rc) { 3498 if (rc) {
3503 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | 3499 lpfc_printf_log(phba, KERN_ERR, LOG_FIP |
@@ -3647,8 +3643,7 @@ void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *phba)
3647 3643
3648 /* Scan FCF table from the first entry to re-discover SAN */ 3644 /* Scan FCF table from the first entry to re-discover SAN */
3649 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY, 3645 lpfc_printf_log(phba, KERN_INFO, LOG_FIP | LOG_DISCOVERY,
3650 "2777 Start FCF table scan after FCF " 3646 "2777 Start post-quiescent FCF table scan\n");
3651 "rediscovery quiescent period over\n");
3652 rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST); 3647 rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST);
3653 if (rc) 3648 if (rc)
3654 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, 3649 lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY,
@@ -4166,7 +4161,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
4166 goto out_free_active_sgl; 4161 goto out_free_active_sgl;
4167 } 4162 }
4168 4163
4169 /* Allocate eligible FCF bmask memory for FCF round robin failover */ 4164 /* Allocate eligible FCF bmask memory for FCF roundrobin failover */
4170 longs = (LPFC_SLI4_FCF_TBL_INDX_MAX + BITS_PER_LONG - 1)/BITS_PER_LONG; 4165 longs = (LPFC_SLI4_FCF_TBL_INDX_MAX + BITS_PER_LONG - 1)/BITS_PER_LONG;
4171 phba->fcf.fcf_rr_bmask = kzalloc(longs * sizeof(unsigned long), 4166 phba->fcf.fcf_rr_bmask = kzalloc(longs * sizeof(unsigned long),
4172 GFP_KERNEL); 4167 GFP_KERNEL);