diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2014-11-27 14:52:05 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2014-11-27 14:52:05 +0000 |
commit | 4c1aa1b90d6261f14cac0fb250d7e8c46c3ca2b2 (patch) | |
tree | c71753cd94b774803c4f98126050d3f746ac886e /sys/dev/pci/if_ale.c | |
parent | be4bb5429c1b5633cbc7cacd35da574950fb86fa (diff) |
Fix a long standing bug in MAC statistics register access. One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong.
From FreeBSD
ok mikeb@
Diffstat (limited to 'sys/dev/pci/if_ale.c')
-rw-r--r-- | sys/dev/pci/if_ale.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index 8034fa18bc5..5bf134058e9 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.33 2014/11/24 02:03:37 brad Exp $ */ +/* $OpenBSD: if_ale.c,v 1.34 2014/11/27 14:52:04 brad Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1239,7 +1239,6 @@ ale_stats_update(struct ale_softc *sc) stat->tx_multi_colls += smb->tx_multi_colls; stat->tx_late_colls += smb->tx_late_colls; stat->tx_excess_colls += smb->tx_excess_colls; - stat->tx_abort += smb->tx_abort; stat->tx_underrun += smb->tx_underrun; stat->tx_desc_underrun += smb->tx_desc_underrun; stat->tx_lenerrs += smb->tx_lenerrs; @@ -1252,17 +1251,10 @@ ale_stats_update(struct ale_softc *sc) ifp->if_collisions += smb->tx_single_colls + smb->tx_multi_colls * 2 + smb->tx_late_colls + - smb->tx_abort * HDPX_CFG_RETRY_DEFAULT; + smb->tx_excess_colls * HDPX_CFG_RETRY_DEFAULT; - /* - * XXX - * tx_pkts_truncated counter looks suspicious. It constantly - * increments with no sign of Tx errors. This may indicate - * the counter name is not correct one so I've removed the - * counter in output errors. - */ - ifp->if_oerrors += smb->tx_abort + smb->tx_late_colls + - smb->tx_underrun; + ifp->if_oerrors += smb->tx_late_colls + smb->tx_excess_colls + + smb->tx_underrun + smb->tx_pkts_truncated; ifp->if_ipackets += smb->rx_frames; |