aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ale
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2014-10-08 01:03:32 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2014-10-08 01:03:32 +0000
commit0999f75a2f82ed0e67b49649e561964edcbe1938 (patch)
tree1a1fe024b4a92725ee64e12d982556902a664164 /sys/dev/ale
parentf6f6703f2798763beb8f2bdd04080f9832e75d60 (diff)
downloadsrc-0999f75a2f82ed0e67b49649e561964edcbe1938.tar.gz
src-0999f75a2f82ed0e67b49649e561964edcbe1938.zip
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.
Notes
Notes: svn path=/head/; revision=272721
Diffstat (limited to 'sys/dev/ale')
-rw-r--r--sys/dev/ale/if_ale.c16
-rw-r--r--sys/dev/ale/if_alereg.h1
2 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/ale/if_ale.c b/sys/dev/ale/if_ale.c
index 78dfa0e40b2e..3a728f4ad9ac 100644
--- a/sys/dev/ale/if_ale.c
+++ b/sys/dev/ale/if_ale.c
@@ -946,8 +946,6 @@ ale_sysctl_node(struct ale_softc *sc)
&stats->tx_late_colls, "Late collisions");
ALE_SYSCTL_STAT_ADD32(ctx, child, "excess_colls",
&stats->tx_excess_colls, "Excessive collisions");
- ALE_SYSCTL_STAT_ADD32(ctx, child, "abort",
- &stats->tx_abort, "Aborted frames due to Excessive collisions");
ALE_SYSCTL_STAT_ADD32(ctx, child, "underruns",
&stats->tx_underrun, "FIFO underruns");
ALE_SYSCTL_STAT_ADD32(ctx, child, "desc_underruns",
@@ -2197,7 +2195,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;
@@ -2210,17 +2207,10 @@ ale_stats_update(struct ale_softc *sc)
if_inc_counter(ifp, IFCOUNTER_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.
- */
- if_inc_counter(ifp, IFCOUNTER_OERRORS,
- smb->tx_abort + smb->tx_late_colls + smb->tx_underrun);
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, smb->tx_late_colls +
+ smb->tx_excess_colls + smb->tx_underrun + smb->tx_pkts_truncated);
if_inc_counter(ifp, IFCOUNTER_IPACKETS, smb->rx_frames);
diff --git a/sys/dev/ale/if_alereg.h b/sys/dev/ale/if_alereg.h
index 445af99dafe2..5804c53724a2 100644
--- a/sys/dev/ale/if_alereg.h
+++ b/sys/dev/ale/if_alereg.h
@@ -605,7 +605,6 @@ struct smb {
uint32_t tx_multi_colls;
uint32_t tx_late_colls;
uint32_t tx_excess_colls;
- uint32_t tx_abort;
uint32_t tx_underrun;
uint32_t tx_desc_underrun;
uint32_t tx_lenerrs;