diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 56421c714bf8..8341d44fe87b 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -3526,6 +3526,32 @@ lpfc_sli4_async_dcbx_evt(struct lpfc_hba *phba, | |||
3526 | } | 3526 | } |
3527 | 3527 | ||
3528 | /** | 3528 | /** |
3529 | * lpfc_sli4_async_grp5_evt - Process the asynchronous group5 event | ||
3530 | * @phba: pointer to lpfc hba data structure. | ||
3531 | * @acqe_link: pointer to the async grp5 completion queue entry. | ||
3532 | * | ||
3533 | * This routine is to handle the SLI4 asynchronous grp5 event. A grp5 event | ||
3534 | * is an asynchronous notified of a logical link speed change. The Port | ||
3535 | * reports the logical link speed in units of 10Mbps. | ||
3536 | **/ | ||
3537 | static void | ||
3538 | lpfc_sli4_async_grp5_evt(struct lpfc_hba *phba, | ||
3539 | struct lpfc_acqe_grp5 *acqe_grp5) | ||
3540 | { | ||
3541 | uint16_t prev_ll_spd; | ||
3542 | |||
3543 | phba->fc_eventTag = acqe_grp5->event_tag; | ||
3544 | phba->fcoe_eventtag = acqe_grp5->event_tag; | ||
3545 | prev_ll_spd = phba->sli4_hba.link_state.logical_speed; | ||
3546 | phba->sli4_hba.link_state.logical_speed = | ||
3547 | (bf_get(lpfc_acqe_grp5_llink_spd, acqe_grp5)); | ||
3548 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | ||
3549 | "2789 GRP5 Async Event: Updating logical link speed " | ||
3550 | "from %dMbps to %dMbps\n", (prev_ll_spd * 10), | ||
3551 | (phba->sli4_hba.link_state.logical_speed*10)); | ||
3552 | } | ||
3553 | |||
3554 | /** | ||
3529 | * lpfc_sli4_async_event_proc - Process all the pending asynchronous event | 3555 | * lpfc_sli4_async_event_proc - Process all the pending asynchronous event |
3530 | * @phba: pointer to lpfc hba data structure. | 3556 | * @phba: pointer to lpfc hba data structure. |
3531 | * | 3557 | * |
@@ -3561,6 +3587,10 @@ void lpfc_sli4_async_event_proc(struct lpfc_hba *phba) | |||
3561 | lpfc_sli4_async_dcbx_evt(phba, | 3587 | lpfc_sli4_async_dcbx_evt(phba, |
3562 | &cq_event->cqe.acqe_dcbx); | 3588 | &cq_event->cqe.acqe_dcbx); |
3563 | break; | 3589 | break; |
3590 | case LPFC_TRAILER_CODE_GRP5: | ||
3591 | lpfc_sli4_async_grp5_evt(phba, | ||
3592 | &cq_event->cqe.acqe_grp5); | ||
3593 | break; | ||
3564 | default: | 3594 | default: |
3565 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3595 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
3566 | "1804 Invalid asynchrous event code: " | 3596 | "1804 Invalid asynchrous event code: " |