aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2012-07-23 17:16:06 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-24 16:54:15 -0400
commitc20cd5d753a452807b080bbf390e2f844d7991b3 (patch)
tree63d5c97df001707fb0351709d598ac8f99204a5c /drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
parent3c4cfadef6a1665d9cd02a543782d03d3e6740c6 (diff)
bnx2x: Correct EEE statistics gathering
In boards with 4-ports, Tx LPI statistics were gathered incorrectly. This patch guarantees that each pmf will only query its own port for these statistics. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 667d89042d35..332db64dd5be 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -785,9 +785,11 @@ static int bnx2x_hw_stats_update(struct bnx2x *bp)
785 785
786 pstats->host_port_stats_counter++; 786 pstats->host_port_stats_counter++;
787 787
788 if (CHIP_IS_E3(bp)) 788 if (CHIP_IS_E3(bp)) {
789 estats->eee_tx_lpi += REG_RD(bp, 789 u32 lpi_reg = BP_PORT(bp) ? MISC_REG_CPMU_LP_SM_ENT_CNT_P1
790 MISC_REG_CPMU_LP_SM_ENT_CNT_P0); 790 : MISC_REG_CPMU_LP_SM_ENT_CNT_P0;
791 estats->eee_tx_lpi += REG_RD(bp, lpi_reg);
792 }
791 793
792 if (!BP_NOMCP(bp)) { 794 if (!BP_NOMCP(bp)) {
793 u32 nig_timer_max = 795 u32 nig_timer_max =