#ifndef __IF_RGE_DEBUG_H__
#define __IF_RGE_DEBUG_H__
#define RGE_DEBUG_XMIT 0x00000001
#define RGE_DEBUG_RECV 0x00000002
#define RGE_DEBUG_INTR 0x00000004
#define RGE_DEBUG_SETUP 0x00000008
#define RGE_DEBUG_INIT 0x00000010
#define RGE_DEBUG_XMIT_DESC 0x00000020
#define RGE_DEBUG_RECV_DESC 0x00000040
#define RGE_DPRINTF(sc, dbg, ...) \
do { \
if (((sc)->sc_debug & (dbg)) != 0) \
device_printf((sc)->sc_dev, __VA_ARGS__); \
} while (0)
#define RGE_DLOG(sc, dbg, ...) \
do { \
if (((sc)->sc_debug & (dbg)) != 0) \
device_log((sc)->sc_dev, LOG_DEBUG, \
__VA_ARGS__); \
} while (0)
#define RGE_PRINT_ERROR(sc, ...) \
do { \
device_printf((sc)->sc_dev, "[ERR] " __VA_ARGS__); \
} while (0)
#define RGE_PRINT_INFO(sc, ...) \
do { \
device_printf((sc)->sc_dev, "[INFO] " __VA_ARGS__); \
} while (0)
#define RGE_PRINT_TODO(sc, ...) \
do { \
device_printf((sc)->sc_dev, "[TODO] " __VA_ARGS__); \
} while (0)
#define RGE_PRINT_WARN(sc, ...) \
do { \
device_printf((sc)->sc_dev, "[WARN] " __VA_ARGS__); \
} while (0)
#endif