Go to the documentation of this file.
44 #ifndef MPT2SAS_DEBUG_H_INCLUDED
45 #define MPT2SAS_DEBUG_H_INCLUDED
47 #define MPT_DEBUG 0x00000001
48 #define MPT_DEBUG_MSG_FRAME 0x00000002
49 #define MPT_DEBUG_SG 0x00000004
50 #define MPT_DEBUG_EVENTS 0x00000008
51 #define MPT_DEBUG_EVENT_WORK_TASK 0x00000010
52 #define MPT_DEBUG_INIT 0x00000020
53 #define MPT_DEBUG_EXIT 0x00000040
54 #define MPT_DEBUG_FAIL 0x00000080
55 #define MPT_DEBUG_TM 0x00000100
56 #define MPT_DEBUG_REPLY 0x00000200
57 #define MPT_DEBUG_HANDSHAKE 0x00000400
58 #define MPT_DEBUG_CONFIG 0x00000800
59 #define MPT_DEBUG_DL 0x00001000
60 #define MPT_DEBUG_RESET 0x00002000
61 #define MPT_DEBUG_SCSI 0x00004000
62 #define MPT_DEBUG_IOCTL 0x00008000
63 #define MPT_DEBUG_CSMISAS 0x00010000
64 #define MPT_DEBUG_SAS 0x00020000
65 #define MPT_DEBUG_TRANSPORT 0x00040000
66 #define MPT_DEBUG_TASK_SET_FULL 0x00080000
68 #define MPT_DEBUG_TARGET_MODE 0x00100000
75 #ifdef CONFIG_SCSI_MPT2SAS_LOGGING
76 #define MPT_CHECK_LOGGING(IOC, CMD, BITS) \
78 if (IOC->logging_level & BITS) \
82 #define MPT_CHECK_LOGGING(IOC, CMD, BITS)
90 #define dprintk(IOC, CMD) \
91 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG)
93 #define dsgprintk(IOC, CMD) \
94 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SG)
96 #define devtprintk(IOC, CMD) \
97 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EVENTS)
99 #define dewtprintk(IOC, CMD) \
100 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EVENT_WORK_TASK)
102 #define dinitprintk(IOC, CMD) \
103 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_INIT)
105 #define dexitprintk(IOC, CMD) \
106 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_EXIT)
108 #define dfailprintk(IOC, CMD) \
109 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_FAIL)
111 #define dtmprintk(IOC, CMD) \
112 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TM)
114 #define dreplyprintk(IOC, CMD) \
115 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_REPLY)
117 #define dhsprintk(IOC, CMD) \
118 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_HANDSHAKE)
120 #define dcprintk(IOC, CMD) \
121 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_CONFIG)
123 #define ddlprintk(IOC, CMD) \
124 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_DL)
126 #define drsprintk(IOC, CMD) \
127 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_RESET)
129 #define dsprintk(IOC, CMD) \
130 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SCSI)
132 #define dctlprintk(IOC, CMD) \
133 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_IOCTL)
135 #define dcsmisasprintk(IOC, CMD) \
136 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_CSMISAS)
138 #define dsasprintk(IOC, CMD) \
139 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SAS)
141 #define dsastransport(IOC, CMD) \
142 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SAS_WIDE)
144 #define dmfprintk(IOC, CMD) \
145 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_MSG_FRAME)
147 #define dtsfprintk(IOC, CMD) \
148 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TASK_SET_FULL)
150 #define dtransportprintk(IOC, CMD) \
151 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TRANSPORT)
153 #define dTMprintk(IOC, CMD) \
154 MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_TARGET_MODE)
157 #ifdef CONFIG_SCSI_MPT2SAS_LOGGING
170 for (i = 0; i < sz; i++) {
171 if (i && ((i % 8) == 0))
178 #define _debug_dump_mf(mpi_request, sz)