summaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorCarolyn Wyborny <carolyn.wyborny@intel.com>2011-02-26 08:42:37 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-03-08 02:59:19 +0100
commit0a915b95d67f3bf63121c04aeb4eaebb183feb58 (patch)
tree4b197fc0e043e71e1b4817688c643c69fadb1d50 /drivers/net/igb/igb_main.c
parente1000e: fix build issue due to undefined reference to crc32_le (diff)
downloadlinux-0a915b95d67f3bf63121c04aeb4eaebb183feb58.tar.xz
linux-0a915b95d67f3bf63121c04aeb4eaebb183feb58.zip
igb: Add stats output for OS2BMC feature on i350 devices
This patch adds statistics output for OS2BMC feature which is configured by eeprom on capable devices. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index eef380af0537..3666b967846a 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4560,6 +4560,15 @@ void igb_update_stats(struct igb_adapter *adapter,
adapter->stats.mgptc += rd32(E1000_MGTPTC);
adapter->stats.mgprc += rd32(E1000_MGTPRC);
adapter->stats.mgpdc += rd32(E1000_MGTPDC);
+
+ /* OS2BMC Stats */
+ reg = rd32(E1000_MANC);
+ if (reg & E1000_MANC_EN_BMC2OS) {
+ adapter->stats.o2bgptc += rd32(E1000_O2BGPTC);
+ adapter->stats.o2bspc += rd32(E1000_O2BSPC);
+ adapter->stats.b2ospc += rd32(E1000_B2OSPC);
+ adapter->stats.b2ogprc += rd32(E1000_B2OGPRC);
+ }
}
static irqreturn_t igb_msix_other(int irq, void *data)