1 /* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * ---------------------------------------------------------------------------*/
10 #define OZ_WANT_VERBOSE_DBG 1
13 #define OZ_DBG_STREAM 0x1
14 #define OZ_DBG_URB 0x2
15 #define OZ_DBG_CTRL_DETAIL 0x4
16 #define OZ_DBG_HUB 0x8
17 #define OZ_DBG_RX_FRAMES 0x10
18 #define OZ_DBG_TX_FRAMES 0x20
20 #define OZ_DEFAULT_DBG_MASK \
22 /* OZ_DBG_STREAM | */ \
24 /* OZ_DBG_CTRL_DETAIL | */ \
26 /* OZ_DBG_RX_FRAMES | */ \
27 /* OZ_DBG_TX_FRAMES | */ \
30 extern unsigned int oz_dbg_mask
;
32 #define oz_want_dbg(mask) \
33 ((OZ_WANT_DBG && (OZ_DBG_##mask == OZ_DBG_ON)) || \
34 (OZ_WANT_VERBOSE_DBG && (OZ_DBG_##mask & oz_dbg_mask)))
36 #define oz_dbg(mask, fmt, ...) \
38 if (oz_want_dbg(mask)) \
39 pr_debug(fmt, ##__VA_ARGS__); \
42 #define oz_cdev_dbg(cdev, mask, fmt, ...) \
44 if (oz_want_dbg(mask)) \
45 netdev_dbg((cdev)->dev, fmt, ##__VA_ARGS__); \
48 #define oz_pd_dbg(pd, mask, fmt, ...) \
50 if (oz_want_dbg(mask)) \
51 pr_debug(fmt, ##__VA_ARGS__); \