scsi: lpfc: Fix link speed reporting for 4-link trunk
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Mar 2019 23:30:26 +0000 (16:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Mar 2019 17:15:09 +0000 (13:15 -0400)
Driver is using uint16_t and is encountering an overflow of the 16bits when
calculating link speed.

Fix by using a u32 type.

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>
drivers/scsi/lpfc/lpfc_sli4.h

index 40c85091c805099e672cd3cc6acbff6181da0b82..f90ade037cfe8d8c9d227d50bf57c29476dad6bf 100644 (file)
@@ -258,13 +258,13 @@ struct lpfc_queue {
 };
 
 struct lpfc_sli4_link {
-       uint16_t speed;
+       uint32_t speed;
        uint8_t duplex;
        uint8_t status;
        uint8_t type;
        uint8_t number;
        uint8_t fault;
-       uint16_t logical_speed;
+       uint32_t logical_speed;
        uint16_t topology;
 };