浏览代码

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>
Thomas Lange 14 年之前
父节点
当前提交
60aeba2310
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/davinci_emac.c

+ 1 - 1
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;