mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Use one counter instead of four to make up TX collision stats as BCM5705+.
It reduces chance of errors from multiple counter wraps at the same time.
This commit is contained in:
parent
b5483b3c90
commit
8634dfff05
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165181
@ -3088,14 +3088,7 @@ bge_stats_update(struct bge_softc *sc)
|
||||
#define READ_STAT(sc, stats, stat) \
|
||||
CSR_READ_4(sc, stats + offsetof(struct bge_stats, stat))
|
||||
|
||||
cnt = READ_STAT(sc, stats,
|
||||
txstats.dot3StatsSingleCollisionFrames.bge_addr_lo);
|
||||
cnt += READ_STAT(sc, stats,
|
||||
txstats.dot3StatsMultipleCollisionFrames.bge_addr_lo);
|
||||
cnt += READ_STAT(sc, stats,
|
||||
txstats.dot3StatsExcessiveCollisions.bge_addr_lo);
|
||||
cnt += READ_STAT(sc, stats,
|
||||
txstats.dot3StatsLateCollisions.bge_addr_lo);
|
||||
cnt = READ_STAT(sc, stats, txstats.etherStatsCollisions.bge_addr_lo);
|
||||
ifp->if_collisions += (uint32_t)(cnt - sc->bge_tx_collisions);
|
||||
sc->bge_tx_collisions = cnt;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user