summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorDick Kennedy <dick.kennedy@broadcom.com>2020-08-04 00:02:22 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-08-05 03:56:57 +0300
commita1e4d3d8aef92d0099b1a559e21aad4789dbe13c (patch)
treef9cbe94b98d24fac79735456c8a93d87cf9167fc /drivers/scsi/lpfc/lpfc_attr.c
parent1eaff53649b83aca01d46e034b0590dd0504360a (diff)
downloadlinux-a1e4d3d8aef92d0099b1a559e21aad4789dbe13c.tar.xz
scsi: lpfc: Fix FCoE speed reporting
Current Link speed was shown as "unknown" in sysfs for FCoE ports. In this scenario, the port was working in 20G speed, which happens to not be a speed handled by the driver. Add support for all possible link speeds that could get reported from port_speed field in link state ACQE. Additionally, as supported_speeds can't be manipulated via the FCoE driver on a converged ethernet port (it must be managed by the nic function), don't fill out the supported_speeds field for the fc host object in sysfs. Revise debug logging to report Link speed mgmt valuess. Link: https://lore.kernel.org/r/20200803210229.23063-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index a62c60ca6477..cc2c907777d2 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -6679,9 +6679,15 @@ lpfc_get_host_speed(struct Scsi_Host *shost)
}
} else if (lpfc_is_link_up(phba) && (phba->hba_flag & HBA_FCOE_MODE)) {
switch (phba->fc_linkspeed) {
+ case LPFC_ASYNC_LINK_SPEED_1GBPS:
+ fc_host_speed(shost) = FC_PORTSPEED_1GBIT;
+ break;
case LPFC_ASYNC_LINK_SPEED_10GBPS:
fc_host_speed(shost) = FC_PORTSPEED_10GBIT;
break;
+ case LPFC_ASYNC_LINK_SPEED_20GBPS:
+ fc_host_speed(shost) = FC_PORTSPEED_20GBIT;
+ break;
case LPFC_ASYNC_LINK_SPEED_25GBPS:
fc_host_speed(shost) = FC_PORTSPEED_25GBIT;
break;