提交 60aeba23 编写于 作者: T Thomas Lange 提交者: David S. Miller

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: NThomas Lange <thomas@corelatus.se>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0b322111
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册