aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 41ee7d5c415a..7f45ac9964a9 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -4163,7 +4163,7 @@ lpfc_info(struct Scsi_Host *host)
4163{ 4163{
4164 struct lpfc_vport *vport = (struct lpfc_vport *) host->hostdata; 4164 struct lpfc_vport *vport = (struct lpfc_vport *) host->hostdata;
4165 struct lpfc_hba *phba = vport->phba; 4165 struct lpfc_hba *phba = vport->phba;
4166 int len; 4166 int len, link_speed = 0;
4167 static char lpfcinfobuf[384]; 4167 static char lpfcinfobuf[384];
4168 4168
4169 memset(lpfcinfobuf,0,384); 4169 memset(lpfcinfobuf,0,384);
@@ -4184,12 +4184,18 @@ lpfc_info(struct Scsi_Host *host)
4184 phba->Port); 4184 phba->Port);
4185 } 4185 }
4186 len = strlen(lpfcinfobuf); 4186 len = strlen(lpfcinfobuf);
4187 if (phba->sli4_hba.link_state.logical_speed) { 4187 if (phba->sli_rev <= LPFC_SLI_REV3) {
4188 snprintf(lpfcinfobuf + len, 4188 link_speed = lpfc_sli_port_speed_get(phba);
4189 384-len, 4189 } else {
4190 " Logical Link Speed: %d Mbps", 4190 if (phba->sli4_hba.link_state.logical_speed)
4191 phba->sli4_hba.link_state.logical_speed * 10); 4191 link_speed =
4192 phba->sli4_hba.link_state.logical_speed;
4193 else
4194 link_speed = phba->sli4_hba.link_state.speed;
4192 } 4195 }
4196 if (link_speed != 0)
4197 snprintf(lpfcinfobuf + len, 384-len,
4198 " Logical Link Speed: %d Mbps", link_speed);
4193 } 4199 }
4194 return lpfcinfobuf; 4200 return lpfcinfobuf;
4195} 4201}