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 Fix a bug that MBSDC (Bad SFD Count) isn't...



details:   https://anonhg.NetBSD.org/src/rev/23860a23a01c
branches:  trunk
changeset: 965188:23860a23a01c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Sep 05 08:06:51 2019 +0000

description:
Fix a bug that MBSDC (Bad SFD Count) isn't counted on X550EM_X and X550EM_A.
The register is for X550 and newer.

diffstat:

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

diffs (28 lines):

diff -r e5e5c3c89543 -r 23860a23a01c sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed Sep 04 13:30:52 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Sep 05 08:06:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.208 2019/09/04 08:13:43 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.209 2019/09/05 08:06:51 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -1571,7 +1571,7 @@
        stats->illerrc.ev_count += IXGBE_READ_REG(hw, IXGBE_ILLERRC);
        stats->errbc.ev_count += IXGBE_READ_REG(hw, IXGBE_ERRBC);
        stats->mspdc.ev_count += IXGBE_READ_REG(hw, IXGBE_MSPDC);
-       if (hw->mac.type == ixgbe_mac_X550)
+       if (hw->mac.type >= ixgbe_mac_X550)
                stats->mbsdc.ev_count += IXGBE_READ_REG(hw, IXGBE_MBSDC);
 
        /* 16 registers exist */
@@ -2126,7 +2126,8 @@
        stats->illerrc.ev_count = 0;
        stats->errbc.ev_count = 0;
        stats->mspdc.ev_count = 0;
-       stats->mbsdc.ev_count = 0;
+       if (hw->mac.type >= ixgbe_mac_X550)
+               stats->mbsdc.ev_count = 0;
        stats->mpctotal.ev_count = 0;
        stats->mlfc.ev_count = 0;
        stats->mrfc.ev_count = 0;



Home | Main Index | Thread Index | Old Index