Skip to content

Commit

Permalink
scsi: lpfc: Correct CRC32 calculation for congestion stats
Browse files Browse the repository at this point in the history
lpfc_cgn_calc_crc32() is returning 32 bits, and lpfc_cgn_update_stat() was
using u16 to store the crc32 value.  Correct by redeclaring the local
variable to u32.

Link: https://lore.kernel.org/r/20220412222008.126521-15-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
James Smart authored and Martin K. Petersen committed Apr 19, 2022
1 parent 39a1a86 commit 5295d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/lpfc/lpfc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -5539,7 +5539,7 @@ lpfc_cgn_update_stat(struct lpfc_hba *phba, uint32_t dtag)
struct tm broken;
struct timespec64 cur_time;
u32 cnt;
u16 value;
u32 value;

/* Make sure we have a congestion info buffer */
if (!phba->cgn_i)
Expand Down

0 comments on commit 5295d19

Please sign in to comment.