Module Name:    src
Committed By:   msaitoh
Date:           Thu Jun 25 06:45:10 UTC 2020

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe_82598.c

Log Message:
 Use unsigned to avoid undefined behavior in ixgbe_fc_enable_generic().
Same as ixgbe_common.c rev. 1.24. Found by KUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_82598.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_82598.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.14 src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.15
--- src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.14	Fri Jan  3 12:59:46 2020
+++ src/sys/dev/pci/ixgbe/ixgbe_82598.c	Thu Jun 25 06:45:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82598.c,v 1.14 2020/01/03 12:59:46 pgoyette Exp $ */
+/* $NetBSD: ixgbe_82598.c,v 1.15 2020/06/25 06:45:10 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -538,7 +538,7 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_h
 	}
 
 	/* Configure pause time (2 TCs per register) */
-	reg = hw->fc.pause_time * 0x00010001;
+	reg = (u32)hw->fc.pause_time * 0x00010001;
 	for (i = 0; i < (IXGBE_DCB_MAX_TRAFFIC_CLASS / 2); i++)
 		IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), reg);
 

Reply via email to