Author: adrian
Date: Tue Apr  5 05:29:10 2011
New Revision: 220355
URL: http://svn.freebsd.org/changeset/base/220355

Log:
  Put the ARGE_DEBUG behind a kernel config option.

Modified:
  head/sys/conf/options.mips
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/conf/options.mips
==============================================================================
--- head/sys/conf/options.mips  Tue Apr  5 05:15:48 2011        (r220354)
+++ head/sys/conf/options.mips  Tue Apr  5 05:29:10 2011        (r220355)
@@ -65,3 +65,8 @@ MAXMEM                        opt_global.h
 #
 OCTEON_VENDOR_LANNER           opt_cvmx.h
 OCTEON_BOARD_CAPK_0100ND       opt_cvmx.h
+
+#
+# Options that control the Atheros SoC peripherals
+#
+ARGE_DEBUG                     opt_global.h

Modified: head/sys/mips/atheros/if_arge.c
==============================================================================
--- head/sys/mips/atheros/if_arge.c     Tue Apr  5 05:15:48 2011        
(r220354)
+++ head/sys/mips/atheros/if_arge.c     Tue Apr  5 05:29:10 2011        
(r220355)
@@ -87,7 +87,6 @@ typedef enum {
        ARGE_DBG_INTR   =       0x00000002
 } arge_debug_flags;
 
-#undef ARGE_DEBUG
 #ifdef ARGE_DEBUG
 #define        ARGEDEBUG(_sc, _m, ...)                                         
\
        do {                                                            \
@@ -213,9 +212,11 @@ arge_attach_sysctl(device_t dev)
        struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev);
        struct sysctl_oid *tree = device_get_sysctl_tree(dev);
 
+#ifdef ARGE_DEBUG
        SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
                "debug", CTLFLAG_RW, &sc->arge_debug, 0,
                "arge interface debugging flags");
+#endif
 
        SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
                "tx_pkts_aligned", CTLFLAG_RW, &sc->stats.tx_pkts_aligned, 0,
@@ -225,9 +226,14 @@ arge_attach_sysctl(device_t dev)
                "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, 
0,
                "number of TX unaligned packets");
 
-       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod", 
CTLFLAG_RW, &sc->arge_cdata.arge_tx_prod, 0, "");
-       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_cons", 
CTLFLAG_RW, &sc->arge_cdata.arge_tx_cons, 0, "");
-       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_cnt", 
CTLFLAG_RW, &sc->arge_cdata.arge_tx_cnt, 0, "");
+#ifdef ARGE_DEBUG
+       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod",
+           CTLFLAG_RW, &sc->arge_cdata.arge_tx_prod, 0, "");
+       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_cons",
+           CTLFLAG_RW, &sc->arge_cdata.arge_tx_cons, 0, "");
+       SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_cnt",
+           CTLFLAG_RW, &sc->arge_cdata.arge_tx_cnt, 0, "");
+#endif
 }
 
 static int
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to