Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Set FCTTV(Flow Control Transmit Timer Valu...



details:   https://anonhg.NetBSD.org/src/rev/c4eb3a75a6ec
branches:  trunk
changeset: 462120:c4eb3a75a6ec
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jul 25 07:05:44 2019 +0000

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

diffstat:

 sys/dev/pci/ixgbe/ixgbe_common.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r fd4510ee42e4 -r c4eb3a75a6ec sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c  Thu Jul 25 05:58:25 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c  Thu Jul 25 07:05:44 2019 +0000
@@ -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 @@
        }
 
        /* 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);
 



Home | Main Index | Thread Index | Old Index