diff options
author | James Smart | 2019-05-21 17:49:04 -0700 |
---|---|---|
committer | Martin K. Petersen | 2019-06-18 19:46:21 -0400 |
commit | b8e6f13617db126c8898908e8601f5e4e3b393cf (patch) | |
tree | 21e21ad0a3fa5f89707cae0cc5dffa7324d8606d /drivers/scsi/lpfc/lpfc_bsg.c | |
parent | 04d210c98e11d863ebe38a7e482e40fb90d9ad82 (diff) |
scsi: lpfc: Fix incorrect logical link speed on trunks when links down
Invalid logical speed is displayed for trunk enabled ports when all ports
are down. Also noted that link speed is incorrectly reported for the units
when links are up.
Current code is returning the logical link speed from the last event from
the adapter. In cases where the last link went down, the link speed in the
event was not valid - meaning that although the links where down the field
had a bogus value.
Rework the event handling to qualify the trunk link state before using the
event speed data.
Also correct units on other areas where the logical link speed was taken
from a link event.
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_bsg.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index b0202bc0aa62..b7216d694bff 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -5741,7 +5741,7 @@ lpfc_get_trunk_info(struct bsg_job *job) event_reply->port_speed = phba->sli4_hba.link_state.speed / 1000; event_reply->logical_speed = - phba->sli4_hba.link_state.logical_speed / 100; + phba->sli4_hba.link_state.logical_speed / 1000; job_error: bsg_reply->result = rc; bsg_job_done(job, bsg_reply->result, |