ixgbe: Add x540 statistic counter definitions
authorEmil Tantilov <emil.s.tantilov@intel.com>
Sat, 26 Feb 2011 06:40:11 +0000 (06:40 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 8 Mar 2011 02:06:06 +0000 (18:06 -0800)
Add defines to accumulate and display x540 PHY statistic counters on
transmit/receive.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ixgbe/ixgbe_common.c
drivers/net/ixgbe/ixgbe_type.h

index 85cc3014373833c847ddcb1e3db58452d35df5ab..561f666618e439b585139ac9674a16aa6cd21c4f 100644 (file)
@@ -209,6 +209,15 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw)
                }
        }
 
+       if (hw->mac.type == ixgbe_mac_X540) {
+               if (hw->phy.id == 0)
+                       hw->phy.ops.identify(hw);
+               hw->phy.ops.read_reg(hw, 0x3, IXGBE_PCRC8ECL, &i);
+               hw->phy.ops.read_reg(hw, 0x3, IXGBE_PCRC8ECH, &i);
+               hw->phy.ops.read_reg(hw, 0x3, IXGBE_LDPCECL, &i);
+               hw->phy.ops.read_reg(hw, 0x3, IXGBE_LDPCECH, &i);
+       }
+
        return 0;
 }
 
index 13a45c7c89d0ad3f6056a11b6e20c613302b237b..76bf21b8a10db04558d78def6e96cd6ed7bbfee9 100644 (file)
 #define IXGBE_FCOEDWRC  0x0242C /* Number of FCoE DWords Received */
 #define IXGBE_FCOEPTC   0x08784 /* Number of FCoE Packets Transmitted */
 #define IXGBE_FCOEDWTC  0x08788 /* Number of FCoE DWords Transmitted */
+#define IXGBE_PCRC8ECL  0x0E810
+#define IXGBE_PCRC8ECH  0x0E811
+#define IXGBE_PCRC8ECH_MASK     0x1F
+#define IXGBE_LDPCECL   0x0E820
+#define IXGBE_LDPCECH   0x0E821
 
 /* Management */
 #define IXGBE_MAVTV(_i) (0x05010 + ((_i) * 4)) /* 8 of these (0-7) */