lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on
Subsystems (2)
PATCH 15/16 lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on
Fixed not reporting logical link speed to SCSI midlayer when QoS not on
Signed-off-by James Smart <[email protected]>
---
lpfc_crtn.h | 1 lpfc_hw4.h | 12 +++++ lpfc_init.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----- lpfc_scsi.c | 18 +++++--- lpfc_sli4.h | 2 5 files changed, 151 insertions(+), 16 deletions(-)
drivers/scsi/lpfc/lpfc_crtn.h +1 -0
@@ -467,3 +467,4 @@ int lpfc_sli4_read_config(struct lpfc_hbvoid lpfc_sli4_node_prep (struct lpfc_hba *);int lpfc_sli4_xri_sgl_update (struct lpfc_hba *);void lpfc_free_sgl_list (struct lpfc_hba *,struct list_head *); +uint32_t lpfc_sli_port_speed_get (struct lpfc_hba *);
drivers/scsi/lpfc/lpfc_hw4.h +12 -0
@@ -1305,6 +1305,11 @@ struct lpfc_mbx_mq_create_ext {#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_EVT_CODE_LINK_NO_LINK 0x0 +#define LPFC_EVT_CODE_LINK_10_MBIT 0x1 +#define LPFC_EVT_CODE_LINK_100_MBIT 0x2 +#define LPFC_EVT_CODE_LINK_1_GBIT 0x3 +#define LPFC_EVT_CODE_LINK_10_GBIT 0x4#define lpfc_mbx_mq_create_ext_async_evt_fip_SHIFT LPFC_TRAILER_CODE_FCOE#define lpfc_mbx_mq_create_ext_async_evt_fip_MASK 0x00000001#define lpfc_mbx_mq_create_ext_async_evt_fip_WORD async_evt_bmap
@@ -1314,6 +1319,13 @@ struct lpfc_mbx_mq_create_ext {#define lpfc_mbx_mq_create_ext_async_evt_fc_SHIFT LPFC_TRAILER_CODE_FC#define lpfc_mbx_mq_create_ext_async_evt_fc_MASK 0x00000001#define lpfc_mbx_mq_create_ext_async_evt_fc_WORD async_evt_bmap +#define LPFC_EVT_CODE_FC_NO_LINK 0x0 +#define LPFC_EVT_CODE_FC_1_GBAUD 0x1 +#define LPFC_EVT_CODE_FC_2_GBAUD 0x2 +#define LPFC_EVT_CODE_FC_4_GBAUD 0x4 +#define LPFC_EVT_CODE_FC_8_GBAUD 0x8 +#define LPFC_EVT_CODE_FC_10_GBAUD 0xA +#define LPFC_EVT_CODE_FC_16_GBAUD 0x10#define lpfc_mbx_mq_create_ext_async_evt_sli_SHIFT LPFC_TRAILER_CODE_SLI#define lpfc_mbx_mq_create_ext_async_evt_sli_MASK 0x00000001#define lpfc_mbx_mq_create_ext_async_evt_sli_WORD async_evt_bmap
drivers/scsi/lpfc/lpfc_init.c +125 -9
184 lines not on this page · raw message
drivers/scsi/lpfc/lpfc_scsi.c +12 -6
@@ -4163,7 +4163,7 @@ lpfc_info(struct Scsi_Host *host) {struct lpfc_vport *vport = (struct lpfc_vport *) host->hostdata;struct lpfc_hba *phba = vport->phba; -int len; +int len, link_speed =0 ;static char lpfcinfobuf[384 ];memset (lpfcinfobuf,0 ,384 );
@@ -4184,12 +4184,18 @@ lpfc_info(struct Scsi_Host *host) phba->Port); } len =strlen (lpfcinfobuf); -if (phba->sli4_hba.link_state.logical_speed) { -snprintf (lpfcinfobuf + len, -384 -len, -" Logical Link Speed: %d Mbps" , - phba->sli4_hba.link_state.logical_speed *10 ); +if (phba->sli_rev <=LPFC_SLI_REV3 ) { + link_speed =lpfc_sli_port_speed_get (phba); + }else { +if (phba->sli4_hba.link_state.logical_speed) + link_speed = + phba->sli4_hba.link_state.logical_speed; +else + link_speed = phba->sli4_hba.link_state.speed; } +if (link_speed !=0 ) +snprintf (lpfcinfobuf + len,384 -len, +" Logical Link Speed: %d Mbps" , link_speed); }return lpfcinfobuf; }
drivers/scsi/lpfc/lpfc_sli4.h +1 -1
@@ -168,7 +168,7 @@ struct lpfc_queue { };struct lpfc_sli4_link { -uint8_t speed; +uint16_t speed;uint8_t duplex;uint8_t status;uint8_t type;