Module Name:    src
Committed By:   msaitoh
Date:           Thu Jul 25 07:05:44 UTC 2019

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

Log Message:
 Set FCTTV(Flow Control Transmit Timer Value) register correctly in
ixgbe_fc_enable_generic(). Found by KUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_common.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_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.23 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.24
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.23	Thu Jun 27 05:55:40 2019
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Thu Jul 25 07:05:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.23 2019/06/27 05:55:40 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.24 2019/07/25 07:05:44 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -2950,7 +2950,7 @@ s32 ixgbe_fc_enable_generic(struct ixgbe
 	}
 
 	/* 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