Skip to contentSkip to conversation

mpt fusion: Changes for logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h

PATCH NAK Prakash, Sathya 1 participant 1 message Jul 24, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 mpt fusion: Changes for 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.

---

drivers/message/fusion/Kconfig +14 -0
diff -Naurp b/drivers/message/fusion/Kconfig a/drivers/message/fusion/Kconfig
@@ -102,4 +102,18 @@ config FUSION_LAN
 
 	  If unsure whether you really want or need this, say N.
 
+config FUSION_LOGGING
+	bool "Fusion MPT logging facility"
+	depends on FUSION
+	---help---
+	  This turns on a logging facility that can be used to debug a number
+	  of Fusion MPT related problems.
+
+	  The debug level can be programmed on the fly via SysFS (hex values)
+
+	  echo [level] > /sys/class/scsi_host/host#/debug_level
+
+	  There are various debug levels that an be found in the source:
+	  file:drivers/message/fusion/mptdebug.h
+
 endmenu
drivers/message/fusion/Makefile +3 -34
diff -Naurp b/drivers/message/fusion/Makefile a/drivers/message/fusion/Makefile
@@ -1,39 +1,8 @@
 # Fusion MPT drivers; recognized debug defines...
-#  MPT general:
-#EXTRA_CFLAGS += -DMPT_DEBUG
-#EXTRA_CFLAGS += -DMPT_DEBUG_MSG_FRAME
-#EXTRA_CFLAGS += -DMPT_DEBUG_SG
-#EXTRA_CFLAGS += -DMPT_DEBUG_EVENTS
-#EXTRA_CFLAGS += -DMPT_DEBUG_VERBOSE_EVENTS
-#EXTRA_CFLAGS += -DMPT_DEBUG_INIT
-#EXTRA_CFLAGS += -DMPT_DEBUG_EXIT
-#EXTRA_CFLAGS += -DMPT_DEBUG_FAIL
-#EXTRA_CFLAGS += -DMPT_DEBUG_DV
-#EXTRA_CFLAGS += -DMPT_DEBUG_TM
-#EXTRA_CFLAGS += -DMPT_DEBUG_REPLY
 
-#
-# driver/module specifics...
-#
-#  For mptbase:
-#CFLAGS_mptbase.o += -DMPT_DEBUG_HANDSHAKE
-#CFLAGS_mptbase.o += -DMPT_DEBUG_CONFIG
-#CFLAGS_mptbase.o += -DMPT_DEBUG_DL
-#CFLAGS_mptbase.o += -DMPT_DEBUG_IRQ
-#CFLAGS_mptbase.o += -DMPT_DEBUG_RESET
-#
-#  For mptscsih:
-#CFLAGS_mptscsih.o += -DMPT_DEBUG_SCSI
-#
-#  For mptctl:
-#CFLAGS_mptctl.o += -DMPT_DEBUG_IOCTL
-#
-#  For mptfc:
-#CFLAGS_mptfc.o += -DMPT_DEBUG_FC
-
-#  For mptsas:
-#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS
-#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS_WIDE
+# enable verbose logging
+# CONFIG_FUSION_LOGGING needs to be enabled in Kconfig
+#EXTRA_CFLAGS += -DMPT_DEBUG_VERBOSE
 
 
 #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
drivers/message/fusion/mptbase.h +3 -195

222 lines not on this page · raw message

drivers/message/fusion/mptdebug.h +288 -0

288 lines not on this page · raw message