1#ifndef __BNX2FC_DEBUG__
2#define __BNX2FC_DEBUG__
3
4
5#define LOG_IO 0x01
6#define LOG_TGT 0x02
7#define LOG_HBA 0x04
8#define LOG_ELS 0x08
9#define LOG_MISC 0x10
10#define LOG_ALL 0xff
11
12extern unsigned int bnx2fc_debug_level;
13
14#define BNX2FC_ELS_DBG(fmt, ...) \
15do { \
16 if (unlikely(bnx2fc_debug_level & LOG_ELS)) \
17 pr_info(fmt, ##__VA_ARGS__); \
18} while (0)
19
20#define BNX2FC_MISC_DBG(fmt, ...) \
21do { \
22 if (unlikely(bnx2fc_debug_level & LOG_MISC)) \
23 pr_info(fmt, ##__VA_ARGS__); \
24} while (0)
25
26__printf(2, 3)
27void BNX2FC_IO_DBG(const struct bnx2fc_cmd *io_req, const char *fmt, ...);
28__printf(2, 3)
29void BNX2FC_TGT_DBG(const struct bnx2fc_rport *tgt, const char *fmt, ...);
30__printf(2, 3)
31void BNX2FC_HBA_DBG(const struct fc_lport *lport, const char *fmt, ...);
32
33#endif
34