提交 5295d19d 编写于 作者: J James Smart 提交者: Martin K. Petersen

scsi: lpfc: Correct CRC32 calculation for congestion stats

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.comCo-developed-by: NJustin Tee <justin.tee@broadcom.com>
Signed-off-by: NJustin Tee <justin.tee@broadcom.com>
Signed-off-by: NJames Smart <jsmart2021@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 39a1a86b
...@@ -5539,7 +5539,7 @@ lpfc_cgn_update_stat(struct lpfc_hba *phba, uint32_t dtag) ...@@ -5539,7 +5539,7 @@ lpfc_cgn_update_stat(struct lpfc_hba *phba, uint32_t dtag)
struct tm broken; struct tm broken;
struct timespec64 cur_time; struct timespec64 cur_time;
u32 cnt; u32 cnt;
u16 value; u32 value;
/* Make sure we have a congestion info buffer */ /* Make sure we have a congestion info buffer */
if (!phba->cgn_i) if (!phba->cgn_i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册