From 4452d0999906e3e26b718566362e943fcaa3d694 Mon Sep 17 00:00:00 2001 From: Matt Carlson Date: Thu, 19 May 2011 12:12:51 +0000 Subject: tg3: Fix stats for 5704 and later devices Commit 4d95847381228639844c7197deb8b2211274ef22, entitled "tg3: Workaround rx_discards stat bug" modified the hardware statistics data structure. The modification shifted the statistics so that the labels no longer corresponded to the counter values. This patch fixes the problem by utilizing reserved space for the new counters. Signed-off-by: Matt Carlson Reviewed-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/net/tg3.c') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d05c6a06da44..574fe9785f3c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -364,7 +364,6 @@ static const struct { { "dma_write_prioq_full" }, { "rxbds_empty" }, { "rx_discards" }, - { "mbuf_lwm_thresh_hit" }, { "rx_errors" }, { "rx_threshold_hit" }, @@ -376,7 +375,9 @@ static const struct { { "ring_status_update" }, { "nic_irqs" }, { "nic_avoided_irqs" }, - { "nic_tx_threshold_hit" } + { "nic_tx_threshold_hit" }, + + { "mbuf_lwm_thresh_hit" }, }; #define TG3_NUM_STATS ARRAY_SIZE(ethtool_stats_keys) @@ -9546,6 +9547,8 @@ static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp) ESTAT_ADD(nic_avoided_irqs); ESTAT_ADD(nic_tx_threshold_hit); + ESTAT_ADD(mbuf_lwm_thresh_hit); + return estats; } -- cgit v1.2.3