aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r--drivers/message/fusion/mptbase.h198
1 files changed, 3 insertions, 195 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 98eb9c688e17..15ff22645844 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -186,6 +186,7 @@
186 * MPT drivers. NOTE: Users of these macro defs must 186 * MPT drivers. NOTE: Users of these macro defs must
187 * themselves define their own MYNAM. 187 * themselves define their own MYNAM.
188 */ 188 */
189#define MYIOC_s_DEBUG_FMT KERN_DEBUG MYNAM ": %s: "
189#define MYIOC_s_INFO_FMT KERN_INFO MYNAM ": %s: " 190#define MYIOC_s_INFO_FMT KERN_INFO MYNAM ": %s: "
190#define MYIOC_s_NOTE_FMT KERN_NOTICE MYNAM ": %s: " 191#define MYIOC_s_NOTE_FMT KERN_NOTICE MYNAM ": %s: "
191#define MYIOC_s_WARN_FMT KERN_WARNING MYNAM ": %s: WARNING - " 192#define MYIOC_s_WARN_FMT KERN_WARNING MYNAM ": %s: WARNING - "
@@ -543,6 +544,7 @@ typedef struct _MPT_ADAPTER
543 char board_tracer[16]; 544 char board_tracer[16];
544 u16 nvdata_version_persistent; 545 u16 nvdata_version_persistent;
545 u16 nvdata_version_default; 546 u16 nvdata_version_default;
547 int debug_level;
546 u8 io_missing_delay; 548 u8 io_missing_delay;
547 u8 device_missing_delay; 549 u8 device_missing_delay;
548 SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */ 550 SYSIF_REGS __iomem *chip; /* == c8817000 (mmap) */
@@ -718,171 +720,7 @@ typedef struct _mpt_sge {
718/* 720/*
719 * Funky (private) macros... 721 * Funky (private) macros...
720 */ 722 */
721#ifdef MPT_DEBUG 723#include "mptdebug.h"
722#define dprintk(x) printk x
723#else
724#define dprintk(x)
725#endif
726
727#ifdef MPT_DEBUG_INIT
728#define dinitprintk(x) printk x
729#define DBG_DUMP_FW_REQUEST_FRAME(mfp) \
730 { int i, n = 10; \
731 u32 *m = (u32 *)(mfp); \
732 printk(KERN_INFO " "); \
733 for (i=0; i<n; i++) \
734 printk(" %08x", le32_to_cpu(m[i])); \
735 printk("\n"); \
736 }
737#else
738#define dinitprintk(x)
739#define DBG_DUMP_FW_REQUEST_FRAME(mfp)
740#endif
741
742#ifdef MPT_DEBUG_EXIT
743#define dexitprintk(x) printk x
744#else
745#define dexitprintk(x)
746#endif
747
748#if defined MPT_DEBUG_FAIL || defined (MPT_DEBUG_SG)
749#define dfailprintk(x) printk x
750#else
751#define dfailprintk(x)
752#endif
753
754#ifdef MPT_DEBUG_HANDSHAKE
755#define dhsprintk(x) printk x
756#else
757#define dhsprintk(x)
758#endif
759
760#if defined(MPT_DEBUG_EVENTS) || defined(MPT_DEBUG_VERBOSE_EVENTS)
761#define devtprintk(x) printk x
762#else
763#define devtprintk(x)
764#endif
765
766#ifdef MPT_DEBUG_VERBOSE_EVENTS
767#define devtverboseprintk(x) printk x
768#else
769#define devtverboseprintk(x)
770#endif
771
772#ifdef MPT_DEBUG_RESET
773#define drsprintk(x) printk x
774#else
775#define drsprintk(x)
776#endif
777
778//#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME)
779#if defined(MPT_DEBUG_MSG_FRAME)
780#define dmfprintk(x) printk x
781#define DBG_DUMP_REQUEST_FRAME(mfp) \
782 { int i, n = 24; \
783 u32 *m = (u32 *)(mfp); \
784 for (i=0; i<n; i++) { \
785 if (i && ((i%8)==0)) \
786 printk("\n"); \
787 printk("%08x ", le32_to_cpu(m[i])); \
788 } \
789 printk("\n"); \
790 }
791#else
792#define dmfprintk(x)
793#define DBG_DUMP_REQUEST_FRAME(mfp)
794#endif
795
796#ifdef MPT_DEBUG_IRQ
797#define dirqprintk(x) printk x
798#else
799#define dirqprintk(x)
800#endif
801
802#ifdef MPT_DEBUG_SG
803#define dsgprintk(x) printk x
804#else
805#define dsgprintk(x)
806#endif
807
808#if defined(MPT_DEBUG_DL) || defined(MPT_DEBUG)
809#define ddlprintk(x) printk x
810#else
811#define ddlprintk(x)
812#endif
813
814#ifdef MPT_DEBUG_DV
815#define ddvprintk(x) printk x
816#else
817#define ddvprintk(x)
818#endif
819
820#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)
821#define ddvtprintk(x) printk x
822#else
823#define ddvtprintk(x)
824#endif
825
826#ifdef MPT_DEBUG_IOCTL
827#define dctlprintk(x) printk x
828#else
829#define dctlprintk(x)
830#endif
831
832#ifdef MPT_DEBUG_REPLY
833#define dreplyprintk(x) printk x
834#else
835#define dreplyprintk(x)
836#endif
837
838#ifdef DMPT_DEBUG_FC
839#define dfcprintk(x) printk x
840#else
841#define dfcprintk(x)
842#endif
843
844#ifdef MPT_DEBUG_TM
845#define dtmprintk(x) printk x
846#define DBG_DUMP_TM_REQUEST_FRAME(mfp) \
847 { u32 *m = (u32 *)(mfp); \
848 int i, n = 13; \
849 printk("TM_REQUEST:\n"); \
850 for (i=0; i<n; i++) { \
851 if (i && ((i%8)==0)) \
852 printk("\n"); \
853 printk("%08x ", le32_to_cpu(m[i])); \
854 } \
855 printk("\n"); \
856 }
857#define DBG_DUMP_TM_REPLY_FRAME(mfp) \
858 { u32 *m = (u32 *)(mfp); \
859 int i, n = (le32_to_cpu(m[0]) & 0x00FF0000) >> 16; \
860 printk("TM_REPLY MessageLength=%d:\n", n); \
861 for (i=0; i<n; i++) { \
862 if (i && ((i%8)==0)) \
863 printk("\n"); \
864 printk(" %08x", le32_to_cpu(m[i])); \
865 } \
866 printk("\n"); \
867 }
868#else
869#define dtmprintk(x)
870#define DBG_DUMP_TM_REQUEST_FRAME(mfp)
871#define DBG_DUMP_TM_REPLY_FRAME(mfp)
872#endif
873
874#if defined(MPT_DEBUG_CONFIG) || defined(MPT_DEBUG)
875#define dcprintk(x) printk x
876#else
877#define dcprintk(x)
878#endif
879
880#if defined(MPT_DEBUG_SCSI) || defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME)
881#define dsprintk(x) printk x
882#else
883#define dsprintk(x)
884#endif
885
886 724
887#define MPT_INDEX_2_MFPTR(ioc,idx) \ 725#define MPT_INDEX_2_MFPTR(ioc,idx) \
888 (MPT_FRAME_HDR*)( (u8*)(ioc)->req_frames + (ioc)->req_sz * (idx) ) 726 (MPT_FRAME_HDR*)( (u8*)(ioc)->req_frames + (ioc)->req_sz * (idx) )
@@ -893,36 +731,6 @@ typedef struct _mpt_sge {
893#define MPT_INDEX_2_RFPTR(ioc,idx) \ 731#define MPT_INDEX_2_RFPTR(ioc,idx) \
894 (MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) ) 732 (MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) )
895 733
896#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME)
897#define DBG_DUMP_REPLY_FRAME(mfp) \
898 { u32 *m = (u32 *)(mfp); \
899 int i, n = (le32_to_cpu(m[0]) & 0x00FF0000) >> 16; \
900 printk(KERN_INFO " "); \
901 for (i=0; i<n; i++) \
902 printk(" %08x", le32_to_cpu(m[i])); \
903 printk("\n"); \
904 }
905#define DBG_DUMP_REQUEST_FRAME_HDR(mfp) \
906 { int i, n = 3; \
907 u32 *m = (u32 *)(mfp); \
908 printk(KERN_INFO " "); \
909 for (i=0; i<n; i++) \
910 printk(" %08x", le32_to_cpu(m[i])); \
911 printk("\n"); \
912 }
913#else
914#define DBG_DUMP_REPLY_FRAME(mfp)
915#define DBG_DUMP_REQUEST_FRAME_HDR(mfp)
916#endif
917
918// debug sas wide ports
919#ifdef MPT_DEBUG_SAS_WIDE
920#define dsaswideprintk(x) printk x
921#else
922#define dsaswideprintk(x)
923#endif
924
925
926/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 734/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
927 735
928#define SCSI_STD_SENSE_BYTES 18 736#define SCSI_STD_SENSE_BYTES 18