lpfc 8.3.12: Emulex SLI enhancements
Subsystems (2)
PATCH 1/7 lpfc 8.3.12: Emulex SLI enhancements
- Add the new Logical Link speed event support.
- Add RATOV and EDTOV to the REG_VFI mailbox command.
Signed-off-by Alex Iannicelli <[email protected]>
Signed-off-by James Smart <[email protected]>
---
lpfc_hw.h | 1 lpfc_hw4.h | 53 ++++++++++++++++++++++++++- lpfc_init.c | 30 +++++++++++++++ lpfc_mbox.c | 2 + lpfc_sli.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++--------- lpfc_sli.h | 1 lpfc_sli4.h | 4 +- 7 files changed, 187 insertions(+), 20 deletions(-)
drivers/scsi/lpfc/lpfc_hw4.h +51 -2
@@ -787,6 +787,7 @@ struct mbox_header {#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D +#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A/* FCoE Opcodes */ #define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01
@@ -1108,6 +1109,39 @@ struct lpfc_mbx_mq_create { } u; }; +struct lpfc_mbx_mq_create_ext { +struct mbox_header header; +union { +struct { +uint32_t word0; +#define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0 +#define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF +#define lpfc_mbx_mq_create_ext_num_pages_WORD word0 +uint32_t async_evt_bmap; +#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK +#define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001 +#define lpfc_mbx_mq_create_ext_async_evt_link_WORD async_evt_bmap +#define lpfc_mbx_mq_create_ext_async_evt_fcfste_SHIFT LPFC_TRAILER_CODE_FCOE +#define lpfc_mbx_mq_create_ext_async_evt_fcfste_MASK 0x00000001 +#define lpfc_mbx_mq_create_ext_async_evt_fcfste_WORD async_evt_bmap +#define lpfc_mbx_mq_create_ext_async_evt_group5_SHIFT LPFC_TRAILER_CODE_GRP5 +#define lpfc_mbx_mq_create_ext_async_evt_group5_MASK 0x00000001 +#define lpfc_mbx_mq_create_ext_async_evt_group5_WORD async_evt_bmap +struct mq_context context; +struct dma_address page[LPFC_MAX_MQ_PAGE ]; + } request; +struct { +uint32_t word0; +#define lpfc_mbx_mq_create_q_id_SHIFT 0 +#define lpfc_mbx_mq_create_q_id_MASK 0x0000FFFF +#define lpfc_mbx_mq_create_q_id_WORD word0 + } response; + } u; +#define LPFC_ASYNC_EVENT_LINK_STATE 0x2 +#define LPFC_ASYNC_EVENT_FCF_STATE 0x4 +#define LPFC_ASYNC_EVENT_GROUP5 0x20 +}; +struct lpfc_mbx_mq_destroy {struct mbox_header header;union {
@@ -1434,8 +1468,8 @@ struct lpfc_mbx_reg_vfi {#define lpfc_reg_vfi_fcfi_WORD word2uint32_t wwn[2 ];struct ulp_bde64 bde; -uint32_t word8_rsvd; -uint32_t word9_rsvd; +uint32_t e_d_tov; +uint32_t r_a_tov;uint32_t word10;#define lpfc_reg_vfi_nport_id_SHIFT 0#define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF
@@ -2048,6 +2082,7 @@ struct lpfc_mqe {struct lpfc_mbx_reg_fcfi reg_fcfi;struct lpfc_mbx_unreg_fcfi unreg_fcfi;struct lpfc_mbx_mq_create mq_create; +struct lpfc_mbx_mq_create_ext mq_create_ext;struct lpfc_mbx_eq_create eq_create;struct lpfc_mbx_cq_create cq_create;struct lpfc_mbx_wq_create wq_create;
@@ -2106,6 +2141,7 @@ struct lpfc_mcqe {#define LPFC_TRAILER_CODE_LINK 0x1#define LPFC_TRAILER_CODE_FCOE 0x2#define LPFC_TRAILER_CODE_DCBX 0x3 +#define LPFC_TRAILER_CODE_GRP5 0x5 };struct lpfc_acqe_link {
@@ -2175,6 +2211,19 @@ struct lpfc_acqe_dcbx {uint32_t trailer; }; +struct lpfc_acqe_grp5 { +uint32_t word0; +#define lpfc_acqe_grp5_pport_SHIFT 0 +#define lpfc_acqe_grp5_pport_MASK 0x000000FF +#define lpfc_acqe_grp5_pport_WORD word0 +uint32_t word1; +#define lpfc_acqe_grp5_llink_spd_SHIFT 16 +#define lpfc_acqe_grp5_llink_spd_MASK 0x0000FFFF +#define lpfc_acqe_grp5_llink_spd_WORD word1 +uint32_t event_tag; +uint32_t trailer; +}; +/* * Define the bootstrap mailbox (bmbx) region used to communicate * mailbox command between the host and port. The mailbox consists
drivers/scsi/lpfc/lpfc_hw.h +1 -0
@@ -1500,6 +1500,7 @@ typedef struct { /* FireFly BIU registe#define MBXERR_BAD_RCV_LENGTH 14#define MBXERR_DMA_ERROR 15#define MBXERR_ERROR 16 +#define MBXERR_UNKNOWN_CMD 18#define MBXERR_LINK_DOWN 0x33#define MBX_NOT_FINISHED 255
drivers/scsi/lpfc/lpfc_init.c +30 -0
@@ -3525,6 +3525,32 @@ lpfc_sli4_async_dcbx_evt(struct lpfc_hba }/** +* lpfc_sli4_async_grp5_evt - Process the asynchronous group5 event +* @phba: pointer to lpfc hba data structure. +* @acqe_link: pointer to the async grp5 completion queue entry. +* +* This routine is to handle the SLI4 asynchronous grp5 event. A grp5 event +* is an asynchronous notified of a logical link speed change. The Port +* reports the logical link speed in units of 10Mbps. +**/ +static void +lpfc_sli4_async_grp5_evt (struct lpfc_hba *phba, +struct lpfc_acqe_grp5 *acqe_grp5) +{ +uint16_t prev_ll_spd; + + phba->fc_eventTag = acqe_grp5->event_tag; + phba->fcoe_eventtag = acqe_grp5->event_tag; + prev_ll_spd = phba->sli4_hba.link_state.logical_speed; + phba->sli4_hba.link_state.logical_speed = + (bf_get (lpfc_acqe_grp5_llink_spd, acqe_grp5)); +lpfc_printf_log (phba,KERN_INFO ,LOG_SLI , +"2789 GRP5 Async Event: Updating logical link speed " +"from %dMbps to %dMbps\n" , (prev_ll_spd *10 ), + (phba->sli4_hba.link_state.logical_speed*10 )); +} + +/** * lpfc_sli4_async_event_proc - Process all the pending asynchronous event * @phba: pointer to lpfc hba data structure. *
@@ -3560,6 +3586,10 @@ void lpfc_sli4_async_event_proc(struct llpfc_sli4_async_dcbx_evt (phba, &cq_event->cqe.acqe_dcbx);break ; +case LPFC_TRAILER_CODE_GRP5 : +lpfc_sli4_async_grp5_evt (phba, + &cq_event->cqe.acqe_grp5); +break ;default :lpfc_printf_log (phba,KERN_ERR ,LOG_SLI , "1804 Invalid asynchrous event code: "
drivers/scsi/lpfc/lpfc_mbox.c +2 -0
@@ -1898,6 +1898,8 @@ lpfc_reg_vfi(struct lpfcMboxq *mbox, strmemcpy (reg_vfi->wwn, &vport->fc_portname,sizeof (struct lpfc_name )); reg_vfi->wwn[0 ] =cpu_to_le32 (reg_vfi->wwn[0 ]); reg_vfi->wwn[1 ] =cpu_to_le32 (reg_vfi->wwn[1 ]); + reg_vfi->e_d_tov = vport->phba->fc_edtov; + reg_vfi->r_a_tov = vport->phba->fc_ratov; reg_vfi->bde.addrHigh =putPaddrHigh (phys); reg_vfi->bde.addrLow =putPaddrLow (phys); reg_vfi->bde.tus.f.bdeSize =sizeof (vport->fc_sparam);
drivers/scsi/lpfc/lpfc_sli4.h +2 -2
@@ -493,8 +493,8 @@ void lpfc_sli4_queue_free(struct lpfc_quuint32_t lpfc_eq_create (struct lpfc_hba *,struct lpfc_queue *,uint16_t );uint32_t lpfc_cq_create (struct lpfc_hba *,struct lpfc_queue *,struct lpfc_queue *,uint32_t ,uint32_t ); -uint32_t lpfc_mq_create (struct lpfc_hba *,struct lpfc_queue *, -struct lpfc_queue *,uint32_t ); +int32_t lpfc_mq_create (struct lpfc_hba *,struct lpfc_queue *, +struct lpfc_queue *,uint32_t );uint32_t lpfc_wq_create (struct lpfc_hba *,struct lpfc_queue *,struct lpfc_queue *,uint32_t ); uint32_t lpfc_rq_create(struct lpfc_hba *, struct lpfc_queue *,
drivers/scsi/lpfc/lpfc_sli.c +100 -16
178 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_sli.h +1 -0
@@ -36,6 +36,7 @@ struct lpfc_cq_event {struct lpfc_acqe_link acqe_link;struct lpfc_acqe_fcoe acqe_fcoe;struct lpfc_acqe_dcbx acqe_dcbx; +struct lpfc_acqe_grp5 acqe_grp5;struct lpfc_rcqe rcqe_cmpl;struct sli4_wcqe_xri_aborted wcqe_axri;struct lpfc_wcqe_complete wcqe_cmpl;