0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef __BNX2FC_DEBUG__
0016 #define __BNX2FC_DEBUG__
0017
0018
0019 #define LOG_IO 0x01
0020 #define LOG_TGT 0x02
0021 #define LOG_HBA 0x04
0022 #define LOG_ELS 0x08
0023 #define LOG_MISC 0x10
0024 #define LOG_ALL 0xff
0025
0026 extern unsigned int bnx2fc_debug_level;
0027
0028 #define BNX2FC_ELS_DBG(fmt, ...) \
0029 do { \
0030 if (unlikely(bnx2fc_debug_level & LOG_ELS)) \
0031 pr_info(fmt, ##__VA_ARGS__); \
0032 } while (0)
0033
0034 #define BNX2FC_MISC_DBG(fmt, ...) \
0035 do { \
0036 if (unlikely(bnx2fc_debug_level & LOG_MISC)) \
0037 pr_info(fmt, ##__VA_ARGS__); \
0038 } while (0)
0039
0040 __printf(2, 3)
0041 void BNX2FC_IO_DBG(const struct bnx2fc_cmd *io_req, const char *fmt, ...);
0042 __printf(2, 3)
0043 void BNX2FC_TGT_DBG(const struct bnx2fc_rport *tgt, const char *fmt, ...);
0044 __printf(2, 3)
0045 void BNX2FC_HBA_DBG(const struct fc_lport *lport, const char *fmt, ...);
0046
0047 #endif