aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/em/if_em.c10
-rw-r--r--sys/dev/em/if_em.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 5be2db8d16e0..3ff8b835fb3e 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -796,7 +796,7 @@ em_watchdog(struct ifnet *ifp)
printf("em%d: watchdog timeout -- resetting\n", adapter->unit);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- ifp->if_oerrors++;
+ adapter->watchdog_events++;
em_init_locked(adapter);
EM_UNLOCK(adapter);
@@ -1019,7 +1019,7 @@ em_intr(void *arg)
}
if (reg_icr & E1000_ICR_RXO) {
- log(LOG_WARNING, "%s: RX overrun\n", ifp->if_xname);
+ adapter->rx_overruns++;
wantinit = 1;
}
}
@@ -3193,7 +3193,8 @@ em_update_stats_counters(struct adapter *adapter)
adapter->stats.mpc + adapter->stats.cexterr;
/* Tx Errors */
- ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol;
+ ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol +
+ adapter->watchdog_events;
}
@@ -3272,6 +3273,9 @@ em_print_hw_stats(struct adapter *adapter)
(long long)adapter->stats.algnerrc);
printf("em%d: Carrier extension errors = %lld\n", unit,
(long long)adapter->stats.cexterr);
+ printf("em%d: RX overruns = %ld\n", unit, adapter->rx_overruns);
+ printf("em%d: watchdog timeouts = %ld\n", unit,
+ adapter->watchdog_events);
printf("em%d: XON Rcvd = %lld\n", unit,
(long long)adapter->stats.xonrxc);
diff --git a/sys/dev/em/if_em.h b/sys/dev/em/if_em.h
index 2e5ab9e8f739..3c38d840ae50 100644
--- a/sys/dev/em/if_em.h
+++ b/sys/dev/em/if_em.h
@@ -48,7 +48,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
-#include <sys/syslog.h>
#include <machine/bus.h>
#include <sys/rman.h>
@@ -387,6 +386,8 @@ struct adapter {
unsigned long no_tx_desc_avail2;
unsigned long no_tx_map_avail;
unsigned long no_tx_dma_setup;
+ unsigned long watchdog_events;
+ unsigned long rx_overruns;
/* Used in for 82547 10Mb Half workaround */
#define EM_PBA_BYTES_SHIFT 0xA