aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.h151
1 files changed, 67 insertions, 84 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h
index ab6afeaa2f2c..533425338e05 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.h
+++ b/drivers/scsi/qla2xxx/qla_dbg.h
@@ -37,134 +37,86 @@
37/* 37/*
38* Macros use for debugging the driver. 38* Macros use for debugging the driver.
39*/ 39*/
40#undef ENTER_TRACE
41#if defined(ENTER_TRACE)
42#define ENTER(x) do { printk("qla2100 : Entering %s()\n", x); } while (0)
43#define LEAVE(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0)
44#define ENTER_INTR(x) do { printk("qla2100 : Entering %s()\n", x); } while (0)
45#define LEAVE_INTR(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0)
46#else
47#define ENTER(x) do {} while (0)
48#define LEAVE(x) do {} while (0)
49#define ENTER_INTR(x) do {} while (0)
50#define LEAVE_INTR(x) do {} while (0)
51#endif
52 40
53#if DEBUG_QLA2100 41#define DEBUG(x) do { if (extended_error_logging) { x; } } while (0)
54#define DEBUG(x) do {x;} while (0);
55#else
56#define DEBUG(x) do {} while (0);
57#endif
58 42
59#if defined(QL_DEBUG_LEVEL_1) 43#if defined(QL_DEBUG_LEVEL_1)
60#define DEBUG1(x) do {x;} while (0); 44#define DEBUG1(x) do {x;} while (0)
61#else 45#else
62#define DEBUG1(x) do {} while (0); 46#define DEBUG1(x) do {} while (0)
63#endif 47#endif
64 48
65#if defined(QL_DEBUG_LEVEL_2) 49#define DEBUG2(x) do { if (extended_error_logging) { x; } } while (0)
66#define DEBUG2(x) do {x;} while (0); 50#define DEBUG2_3(x) do { if (extended_error_logging) { x; } } while (0)
67#define DEBUG2_3(x) do {x;} while (0); 51#define DEBUG2_3_11(x) do { if (extended_error_logging) { x; } } while (0)
68#define DEBUG2_3_11(x) do {x;} while (0); 52#define DEBUG2_9_10(x) do { if (extended_error_logging) { x; } } while (0)
69#define DEBUG2_9_10(x) do {x;} while (0); 53#define DEBUG2_11(x) do { if (extended_error_logging) { x; } } while (0)
70#define DEBUG2_11(x) do {x;} while (0); 54#define DEBUG2_13(x) do { if (extended_error_logging) { x; } } while (0)
71#define DEBUG2_13(x) do {x;} while (0);
72#else
73#define DEBUG2(x) do {} while (0);
74#endif
75 55
76#if defined(QL_DEBUG_LEVEL_3) 56#if defined(QL_DEBUG_LEVEL_3)
77#define DEBUG3(x) do {x;} while (0); 57#define DEBUG3(x) do {x;} while (0)
78#define DEBUG2_3(x) do {x;} while (0); 58#define DEBUG3_11(x) do {x;} while (0)
79#define DEBUG2_3_11(x) do {x;} while (0);
80#define DEBUG3_11(x) do {x;} while (0);
81#else 59#else
82#define DEBUG3(x) do {} while (0); 60#define DEBUG3(x) do {} while (0)
83 #if !defined(QL_DEBUG_LEVEL_2)
84 #define DEBUG2_3(x) do {} while (0);
85 #endif
86#endif 61#endif
87 62
88#if defined(QL_DEBUG_LEVEL_4) 63#if defined(QL_DEBUG_LEVEL_4)
89#define DEBUG4(x) do {x;} while (0); 64#define DEBUG4(x) do {x;} while (0)
90#else 65#else
91#define DEBUG4(x) do {} while (0); 66#define DEBUG4(x) do {} while (0)
92#endif 67#endif
93 68
94#if defined(QL_DEBUG_LEVEL_5) 69#if defined(QL_DEBUG_LEVEL_5)
95#define DEBUG5(x) do {x;} while (0); 70#define DEBUG5(x) do {x;} while (0)
96#else 71#else
97#define DEBUG5(x) do {} while (0); 72#define DEBUG5(x) do {} while (0)
98#endif 73#endif
99 74
100#if defined(QL_DEBUG_LEVEL_7) 75#if defined(QL_DEBUG_LEVEL_7)
101#define DEBUG7(x) do {x;} while (0); 76#define DEBUG7(x) do {x;} while (0)
102#else 77#else
103#define DEBUG7(x) do {} while (0); 78#define DEBUG7(x) do {} while (0)
104#endif 79#endif
105 80
106#if defined(QL_DEBUG_LEVEL_9) 81#if defined(QL_DEBUG_LEVEL_9)
107#define DEBUG9(x) do {x;} while (0); 82#define DEBUG9(x) do {x;} while (0)
108#define DEBUG9_10(x) do {x;} while (0); 83#define DEBUG9_10(x) do {x;} while (0)
109#define DEBUG2_9_10(x) do {x;} while (0);
110#else 84#else
111#define DEBUG9(x) do {} while (0); 85#define DEBUG9(x) do {} while (0)
112#endif 86#endif
113 87
114#if defined(QL_DEBUG_LEVEL_10) 88#if defined(QL_DEBUG_LEVEL_10)
115#define DEBUG10(x) do {x;} while (0); 89#define DEBUG10(x) do {x;} while (0)
116#define DEBUG2_9_10(x) do {x;} while (0); 90#define DEBUG9_10(x) do {x;} while (0)
117#define DEBUG9_10(x) do {x;} while (0);
118#else 91#else
119#define DEBUG10(x) do {} while (0); 92#define DEBUG10(x) do {} while (0)
120 #if !defined(DEBUG2_9_10)
121 #define DEBUG2_9_10(x) do {} while (0);
122 #endif
123 #if !defined(DEBUG9_10) 93 #if !defined(DEBUG9_10)
124 #define DEBUG9_10(x) do {} while (0); 94 #define DEBUG9_10(x) do {} while (0)
125 #endif 95 #endif
126#endif 96#endif
127 97
128#if defined(QL_DEBUG_LEVEL_11) 98#if defined(QL_DEBUG_LEVEL_11)
129#define DEBUG11(x) do{x;} while(0); 99#define DEBUG11(x) do{x;} while(0)
130#if !defined(DEBUG2_11)
131#define DEBUG2_11(x) do{x;} while(0);
132#endif
133#if !defined(DEBUG2_3_11)
134#define DEBUG2_3_11(x) do{x;} while(0);
135#endif
136#if !defined(DEBUG3_11) 100#if !defined(DEBUG3_11)
137#define DEBUG3_11(x) do{x;} while(0); 101#define DEBUG3_11(x) do{x;} while(0)
138#endif 102#endif
139#else 103#else
140#define DEBUG11(x) do{} while(0); 104#define DEBUG11(x) do{} while(0)
141 #if !defined(QL_DEBUG_LEVEL_2)
142 #define DEBUG2_11(x) do{} while(0);
143 #if !defined(QL_DEBUG_LEVEL_3)
144 #define DEBUG2_3_11(x) do{} while(0);
145 #endif
146 #endif
147 #if !defined(QL_DEBUG_LEVEL_3) 105 #if !defined(QL_DEBUG_LEVEL_3)
148 #define DEBUG3_11(x) do{} while(0); 106 #define DEBUG3_11(x) do{} while(0)
149 #endif 107 #endif
150#endif 108#endif
151 109
152#if defined(QL_DEBUG_LEVEL_12) 110#if defined(QL_DEBUG_LEVEL_12)
153#define DEBUG12(x) do {x;} while (0); 111#define DEBUG12(x) do {x;} while (0)
154#else 112#else
155#define DEBUG12(x) do {} while (0); 113#define DEBUG12(x) do {} while (0)
156#endif 114#endif
157 115
158#if defined(QL_DEBUG_LEVEL_13) 116#if defined(QL_DEBUG_LEVEL_13)
159#define DEBUG13(x) do {x;} while (0) 117#define DEBUG13(x) do {x;} while (0)
160#if !defined(DEBUG2_13)
161#define DEBUG2_13(x) do {x;} while(0)
162#endif
163#else 118#else
164#define DEBUG13(x) do {} while (0) 119#define DEBUG13(x) do {} while (0)
165#if !defined(QL_DEBUG_LEVEL_2)
166#define DEBUG2_13(x) do {} while(0)
167#endif
168#endif 120#endif
169 121
170#if defined(QL_DEBUG_LEVEL_14) 122#if defined(QL_DEBUG_LEVEL_14)
@@ -176,9 +128,6 @@
176/* 128/*
177 * Firmware Dump structure definition 129 * Firmware Dump structure definition
178 */ 130 */
179#define FW_DUMP_SIZE_128K 0xBC000
180#define FW_DUMP_SIZE_512K 0x2FC000
181#define FW_DUMP_SIZE_1M 0x5FC000
182 131
183struct qla2300_fw_dump { 132struct qla2300_fw_dump {
184 uint16_t hccr; 133 uint16_t hccr;
@@ -224,8 +173,6 @@ struct qla2100_fw_dump {
224 uint16_t risc_ram[0xf000]; 173 uint16_t risc_ram[0xf000];
225}; 174};
226 175
227#define FW_DUMP_SIZE_24XX 0x2B0000
228
229struct qla24xx_fw_dump { 176struct qla24xx_fw_dump {
230 uint32_t host_status; 177 uint32_t host_status;
231 uint32_t host_reg[32]; 178 uint32_t host_reg[32];
@@ -257,3 +204,39 @@ struct qla24xx_fw_dump {
257 uint32_t code_ram[0x2000]; 204 uint32_t code_ram[0x2000];
258 uint32_t ext_mem[1]; 205 uint32_t ext_mem[1];
259}; 206};
207
208#define EFT_NUM_BUFFERS 4
209#define EFT_BYTES_PER_BUFFER 0x4000
210#define EFT_SIZE ((EFT_BYTES_PER_BUFFER) * (EFT_NUM_BUFFERS))
211
212struct qla2xxx_fw_dump {
213 uint8_t signature[4];
214 uint32_t version;
215
216 uint32_t fw_major_version;
217 uint32_t fw_minor_version;
218 uint32_t fw_subminor_version;
219 uint32_t fw_attributes;
220
221 uint32_t vendor;
222 uint32_t device;
223 uint32_t subsystem_vendor;
224 uint32_t subsystem_device;
225
226 uint32_t fixed_size;
227 uint32_t mem_size;
228 uint32_t req_q_size;
229 uint32_t rsp_q_size;
230
231 uint32_t eft_size;
232 uint32_t eft_addr_l;
233 uint32_t eft_addr_h;
234
235 uint32_t header_size;
236
237 union {
238 struct qla2100_fw_dump isp21;
239 struct qla2300_fw_dump isp23;
240 struct qla24xx_fw_dump isp24;
241 } isp;
242};