Davinci: Do not reset EMAC TX overruns counter on read
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/net/davinci_emac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/davinci_emac.c +1 -1
@@ -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;
Signature · 1 line
1.7.2.5