aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-09-29 11:32:37 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-10-08 07:14:41 -0400
commit8b68cd5258225ca77f7595ed2e310d692dc3ee31 (patch)
tree9c372e951944e3f1e92f58b461d08e2e211ce05a /drivers/scsi/lpfc/lpfc_scsi.c
parent2eb6862aaf7ea0685c997d833c3890dae2f94a62 (diff)
[SCSI] lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
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}