diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2010-10-06 03:35:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-06 14:10:41 -0700 |
commit | 6fe8bce7b3b69835e8049106947db6b0f1f3a8d8 (patch) | |
tree | f56ad87af5d164a5c9beabaf65caa88f5c437154 /drivers/net/bnx2x | |
parent | f85582f8c48addd8166727ef692d88b0ff618c5e (diff) | |
download | op-kernel-dev-6fe8bce7b3b69835e8049106947db6b0f1f3a8d8.zip op-kernel-dev-6fe8bce7b3b69835e8049106947db6b0f1f3a8d8.tar.gz |
bnx2x: properly initialize FW stats
Client statistics need to be initialized to -1
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_stats.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index 5644bdd..4733c83 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -1339,6 +1339,7 @@ void bnx2x_stats_init(struct bnx2x *bp) int port = BP_PORT(bp); int mb_idx = BP_FW_MB_IDX(bp); int i; + struct eth_stats_query *stats = bnx2x_sp(bp, fw_stats); bp->stats_pending = 0; bp->executer_idx = 0; @@ -1380,6 +1381,18 @@ void bnx2x_stats_init(struct bnx2x *bp) memset(&fp->eth_q_stats, 0, sizeof(struct bnx2x_eth_q_stats)); } + for_each_queue(bp, i) { + /* Set initial stats counter in the stats ramrod data to -1 */ + int cl_id = bp->fp[i].cl_id; + + stats->xstorm_common.client_statistics[cl_id]. + stats_counter = 0xffff; + stats->ustorm_common.client_statistics[cl_id]. + stats_counter = 0xffff; + stats->tstorm_common.client_statistics[cl_id]. + stats_counter = 0xffff; + } + memset(&bp->dev->stats, 0, sizeof(struct net_device_stats)); memset(&bp->eth_stats, 0, sizeof(struct bnx2x_eth_stats)); |