aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorCarolyn Wyborny <carolyn.wyborny@intel.com>2012-09-12 00:36:24 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-09-22 04:49:41 -0400
commit3dbdf96928dcdece134113c8ffa137f1a3b5dd88 (patch)
tree3356f57ad9289582e9f138205cef96a8df0a47a9 /drivers/net/ethernet/intel
parentf557147c4615f5e03abb673bd566901783565666 (diff)
igb: Fix stats output on i210/i211 parts.
Due to a hardware issue, on i210 and i211 parts, the TNCRS statistic provides an invalid value. This patch changes the update stats function to increment the stat only for non-i210/i211 parts. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 073009671e7a..60cf3ebf4bb7 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4776,7 +4776,11 @@ void igb_update_stats(struct igb_adapter *adapter,
4776 reg = rd32(E1000_CTRL_EXT); 4776 reg = rd32(E1000_CTRL_EXT);
4777 if (!(reg & E1000_CTRL_EXT_LINK_MODE_MASK)) { 4777 if (!(reg & E1000_CTRL_EXT_LINK_MODE_MASK)) {
4778 adapter->stats.rxerrc += rd32(E1000_RXERRC); 4778 adapter->stats.rxerrc += rd32(E1000_RXERRC);
4779 adapter->stats.tncrs += rd32(E1000_TNCRS); 4779
4780 /* this stat has invalid values on i210/i211 */
4781 if ((hw->mac.type != e1000_i210) &&
4782 (hw->mac.type != e1000_i211))
4783 adapter->stats.tncrs += rd32(E1000_TNCRS);
4780 } 4784 }
4781 4785
4782 adapter->stats.tsctc += rd32(E1000_TSCTC); 4786 adapter->stats.tsctc += rd32(E1000_TSCTC);