From 5c1b91b9923d1b3d33576e391ff7b587bdff7a3e Mon Sep 17 00:00:00 2001 From: "Prakash, Sathya" Date: Tue, 24 Jul 2007 15:40:08 +0530 Subject: [SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h This patch adds a new file mptdebug.h in the fusion source directory, which contains different debug macros. The existing debug macros and flags are removed from the mptbase.h and Makefile In Kconfig a new configuration parameter FUSION_LOGGING is added to enable/disable the logging support during compile time. signed-off-by: Sathya Prakash Signed-off-by: James Bottomley --- drivers/message/fusion/mptbase.h | 198 +-------------------------------------- 1 file changed, 3 insertions(+), 195 deletions(-) (limited to 'drivers/message/fusion/mptbase.h') diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 98eb9c688e1..15ff2264584 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -186,6 +186,7 @@ * MPT drivers. NOTE: Users of these macro defs must * themselves define their own MYNAM. */ +#define MYIOC_s_DEBUG_FMT KERN_DEBUG MYNAM ": %s: " #define MYIOC_s_INFO_FMT KERN_INFO MYNAM ": %s: " #define MYIOC_s_NOTE_FMT KERN_NOTICE MYNAM ": %s: " #define MYIOC_s_WARN_FMT KERN_WARNING MYNAM ": %s: WARNING - " @@ -543,6 +544,7 @@ typedef struct _MPT_ADAPTER char board_tracer[16]; u16 nvdata_version_persistent; u16 nvdata_version_default; + int debug_level; u8 io_missing_delay; u8 device_missing_delay; SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */ @@ -718,171 +720,7 @@ typedef struct _mpt_sge { /* * Funky (private) macros... */ -#ifdef MPT_DEBUG -#define dprintk(x) printk x -#else -#define dprintk(x) -#endif - -#ifdef MPT_DEBUG_INIT -#define dinitprintk(x) printk x -#define DBG_DUMP_FW_REQUEST_FRAME(mfp) \ - { int i, n = 10; \ - u32 *m = (u32 *)(mfp); \ - printk(KERN_INFO " "); \ - for (i=0; i> 16; \ - printk("TM_REPLY MessageLength=%d:\n", n); \ - for (i=0; ireq_frames + (ioc)->req_sz * (idx) ) @@ -893,36 +731,6 @@ typedef struct _mpt_sge { #define MPT_INDEX_2_RFPTR(ioc,idx) \ (MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) ) -#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME) -#define DBG_DUMP_REPLY_FRAME(mfp) \ - { u32 *m = (u32 *)(mfp); \ - int i, n = (le32_to_cpu(m[0]) & 0x00FF0000) >> 16; \ - printk(KERN_INFO " "); \ - for (i=0; i