summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-04-21 08:43:43 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-05-07 03:15:45 -0700
commit58f6bcf96e95f042a2bee6ace238365cb8fb1ce6 (patch)
tree7b4d1fb7e77edde1bc60c95e4c215fb686cfe2ad /drivers/net/ixgbe/ixgbe_main.c
parent67a74ee2a24957012661dc4400e4f8e363d25fbb (diff)
downloadlinux-58f6bcf96e95f042a2bee6ace238365cb8fb1ce6.tar.bz2
ixgbe: add ethtool counters for OS2BMC
OS2BMC registers are available for X540. This patch adds ethtool counters based on those registers. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Evan Swanson <evan.swanson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 56cc9a10c717..a3e384bc50fe 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5912,8 +5912,13 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH);
hwstats->tor += IXGBE_READ_REG(hw, IXGBE_TORH);
break;
- case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
+ /* OS2BMC stats are X540 only*/
+ hwstats->o2bgptc += IXGBE_READ_REG(hw, IXGBE_O2BGPTC);
+ hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);
+ hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC);
+ hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC);
+ case ixgbe_mac_82599EB:
hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL);
IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */
hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL);