* [PATCH] Davinci: Do not reset EMAC TX overruns counter on read
@ 2011-03-09 14:41 Thomas Lange
0 siblings, 0 replies; only message in thread
From: Thomas Lange @ 2011-03-09 14:41 UTC (permalink / raw)
To: netdev
Cc: davinci-linux-open-source@linux.davincidsp.com, davem, anantgole,
chaithrika
Don't reset tx_fifo_errors when reading out current EMAC stats.
(tx_fifo_errors shows up as TX overruns in netdev stats.)
Without this correction, the old counter value is lost every time
stats are read out.
Signed-off-by: Thomas Lange <thomas@corelatus.se>
---
drivers/net/davinci_emac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 2a628d1..922c8c5 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -1730,7 +1730,7 @@ static struct net_device_stats *emac_dev_getnetstats(struct net_device *ndev)
emac_read(EMAC_TXCARRIERSENSE);
emac_write(EMAC_TXCARRIERSENSE, stats_clear_mask);
- ndev->stats.tx_fifo_errors = emac_read(EMAC_TXUNDERRUN);
+ ndev->stats.tx_fifo_errors += emac_read(EMAC_TXUNDERRUN);
emac_write(EMAC_TXUNDERRUN, stats_clear_mask);
return &ndev->stats;
--
1.7.2.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-09 14:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 14:41 [PATCH] Davinci: Do not reset EMAC TX overruns counter on read Thomas Lange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox