summaryrefslogtreecommitdiffstats
path: root/sys/dev/hatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-10-29 14:33:41 +0000
committerharti <harti@FreeBSD.org>2003-10-29 14:33:41 +0000
commit86956669e331575dc91197028b2d219b1919b54f (patch)
tree8a8b01809de2934900ac3d92538d854e040d2817 /sys/dev/hatm
parent379fe50af3ef5d65c9272b988a08aa39603fdbe1 (diff)
downloadFreeBSD-src-86956669e331575dc91197028b2d219b1919b54f.zip
FreeBSD-src-86956669e331575dc91197028b2d219b1919b54f.tar.gz
Make the value of the HATM_DEBUG symbol the default for the debugging
flags. Introduce a new debugging flag to dump received packets.
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r--sys/dev/hatm/if_hatm.c2
-rw-r--r--sys/dev/hatm/if_hatm_rx.c4
-rw-r--r--sys/dev/hatm/if_hatmvar.h22
3 files changed, 15 insertions, 13 deletions
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c
index 7a97629..24a0488 100644
--- a/sys/dev/hatm/if_hatm.c
+++ b/sys/dev/hatm/if_hatm.c
@@ -1797,7 +1797,7 @@ hatm_attach(device_t dev)
hatm_sysctl_lbmem, "S", "local memory") == NULL)
goto failed;
- kenv_getuint(sc, "debug", &sc->debug, 0, 1);
+ kenv_getuint(sc, "debug", &sc->debug, HATM_DEBUG, 1);
#endif
/*
diff --git a/sys/dev/hatm/if_hatm_rx.c b/sys/dev/hatm/if_hatm_rx.c
index f42e821..fb80f81 100644
--- a/sys/dev/hatm/if_hatm_rx.c
+++ b/sys/dev/hatm/if_hatm_rx.c
@@ -160,8 +160,8 @@ hatm_rx(struct hatm_softc *sc, u_int cid, u_int flags, struct mbuf *m0,
return;
}
-#if 0
- {
+#ifdef HATM_DEBUG
+ if (sc->debug & DBG_DUMP) {
struct mbuf *tmp;
for (tmp = vcc->chain; tmp != NULL; tmp = tmp->m_next) {
diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h
index da44932..2f4bfc2 100644
--- a/sys/dev/hatm/if_hatmvar.h
+++ b/sys/dev/hatm/if_hatmvar.h
@@ -588,16 +588,18 @@ struct hatm_softc {
} while (0)
enum {
- DBG_RX = 0x0001,
- DBG_TX = 0x0002,
- DBG_VCC = 0x0004,
- DBG_IOCTL = 0x0008,
- DBG_ATTACH = 0x0010,
- DBG_INTR = 0x0020,
- DBG_DMA = 0x0040,
- DBG_DMAH = 0x0080,
-
- DBG_ALL = 0x00ff
+ DBG_DUMMY = 0x0001, /* default value for -DHATM_DEBUG */
+ DBG_RX = 0x0002,
+ DBG_TX = 0x0004,
+ DBG_VCC = 0x0008,
+ DBG_IOCTL = 0x0010,
+ DBG_ATTACH = 0x0020,
+ DBG_INTR = 0x0040,
+ DBG_DMA = 0x0080,
+ DBG_DMAH = 0x0100,
+ DBG_DUMP = 0x0200,
+
+ DBG_ALL = 0x03ff
};
#else
OpenPOWER on IntegriCloud