diff options
author | Thomas Lange <thomas@corelatus.se> | 2011-03-08 23:41:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-14 18:04:50 -0400 |
commit | 60aeba23101f34a690a0b0a048ffde3d023d4f3b (patch) | |
tree | bff2e733d6bc1e6b51799018df683e89bf8b29f0 /drivers/net/davinci_emac.c | |
parent | 0b32211164da2b100553cb45e4e862f09c5cab11 (diff) |
Davinci: Do not reset EMAC TX overruns counter on read
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r-- | 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 7018bfe408a4..082d6ea69920 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) | |||
1730 | emac_read(EMAC_TXCARRIERSENSE); | 1730 | emac_read(EMAC_TXCARRIERSENSE); |
1731 | emac_write(EMAC_TXCARRIERSENSE, stats_clear_mask); | 1731 | emac_write(EMAC_TXCARRIERSENSE, stats_clear_mask); |
1732 | 1732 | ||
1733 | ndev->stats.tx_fifo_errors = emac_read(EMAC_TXUNDERRUN); | 1733 | ndev->stats.tx_fifo_errors += emac_read(EMAC_TXUNDERRUN); |
1734 | emac_write(EMAC_TXUNDERRUN, stats_clear_mask); | 1734 | emac_write(EMAC_TXUNDERRUN, stats_clear_mask); |
1735 | 1735 | ||
1736 | return &ndev->stats; | 1736 | return &ndev->stats; |