summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2011-03-09 12:24:16 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2011-03-09 12:24:16 +0000
commitb7256b7e835d46a010629132161301d51204c297 (patch)
treee23b9acf422eb8e8bc0f6b785261628e72006910
parenta9056b286c8c47422e7408ff725ac156bbaba7c8 (diff)
HW stats debugging via ifconfig emX debug instead of
a global em_display_debug_stats variable. OK mcbride, matthew, deraadt, henning.
-rw-r--r--sys/dev/pci/if_em.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index e2b210494da..2a2cdab9946 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,21 +31,12 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.249 2011/02/13 19:45:54 miod Exp $ */
+/* $OpenBSD: if_em.c,v 1.250 2011/03/09 12:24:15 mpf Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
#include <dev/pci/if_em_soc.h>
-#ifndef SMALL_KERNEL
-#ifdef EM_DEBUG
-/*********************************************************************
- * Set this to one to display debug statistics
- *********************************************************************/
-int em_display_debug_stats = 0;
-#endif
-#endif
-
/*********************************************************************
* Driver version
*********************************************************************/
@@ -1418,7 +1409,7 @@ em_local_timer(void *arg)
#ifndef SMALL_KERNEL
em_update_stats_counters(sc);
#ifdef EM_DEBUG
- if (em_display_debug_stats && ifp->if_flags & IFF_RUNNING)
+ if (ifp->if_flags & IFF_DEBUG && ifp->if_flags & IFF_RUNNING)
em_print_hw_stats(sc);
#endif
#endif
@@ -3211,7 +3202,7 @@ em_update_stats_counters(struct em_softc *sc)
#ifdef EM_DEBUG
/**********************************************************************
*
- * This routine is called only when em_display_debug_stats is enabled.
+ * This routine is called only when IFF_DEBUG is enabled.
* This routine provides a way to take a look at important statistics
* maintained by the driver and hardware.
*