Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qla_dbg.h
Go to the documentation of this file.
1 /*
2  * QLogic Fibre Channel HBA Driver
3  * Copyright (c) 2003-2012 QLogic Corporation
4  *
5  * See LICENSE.qla2xxx for copyright and licensing details.
6  */
7 
8 #include "qla_def.h"
9 
10 /*
11  * Firmware Dump structure definition
12  */
13 
33  uint16_t risc_ram[0xf800];
36 };
37 
55  uint16_t risc_ram[0xf000];
56 };
57 
86  uint32_t code_ram[0x2000];
88 };
89 
127 };
128 
166 };
167 
214 };
215 
216 #define EFT_NUM_BUFFERS 4
217 #define EFT_BYTES_PER_BUFFER 0x4000
218 #define EFT_SIZE ((EFT_BYTES_PER_BUFFER) * (EFT_NUM_BUFFERS))
219 
220 #define FCE_NUM_BUFFERS 64
221 #define FCE_BYTES_PER_BUFFER 0x400
222 #define FCE_SIZE ((FCE_BYTES_PER_BUFFER) * (FCE_NUM_BUFFERS))
223 #define fce_calc_size(b) ((FCE_BYTES_PER_BUFFER) * (b))
224 
228 
233 };
234 
238 
241 };
242 
245 #define TYPE_REQUEST_QUEUE 0x1
246 #define TYPE_RESPONSE_QUEUE 0x2
247 #define TYPE_ATIO_QUEUE 0x3
250 };
251 
255 };
256 
257 #define DUMP_CHAIN_VARIANT 0x80000000
258 #define DUMP_CHAIN_FCE 0x7FFFFAF0
259 #define DUMP_CHAIN_MQ 0x7FFFFAF1
260 #define DUMP_CHAIN_QUEUE 0x7FFFFAF2
261 #define DUMP_CHAIN_LAST 0x80000000
262 
266 
271 
276 
281 
285 
287 
288  union {
295  } isp;
296 };
297 
298 #define QL_MSGHDR "qla2xxx"
299 #define QL_DBG_DEFAULT1_MASK 0x1e400000
300 
301 #define ql_log_fatal 0 /* display fatal errors */
302 #define ql_log_warn 1 /* display critical errors */
303 #define ql_log_info 2 /* display all recovered errors */
304 #define ql_log_all 3 /* This value is only used by ql_errlev.
305  * No messages will use this value.
306  * This should be always highest value
307  * as compared to other log levels.
308  */
310 extern int ql_errlev;
312 void __attribute__((format (printf, 4, 5)))
314 void __attribute__((format (printf, 4, 5)))
315 ql_dbg_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...);
316 
317 void __attribute__((format (printf, 4, 5)))
318 ql_log(uint32_t, scsi_qla_host_t *vha, int32_t, const char *fmt, ...);
319 void __attribute__((format (printf, 4, 5)))
320 ql_log_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...);
321 
322 /* Debug Levels */
323 /* The 0x40000000 is the max value any debug level can have
324  * as ql2xextended_error_logging is of type signed int
325  */
326 #define ql_dbg_init 0x40000000 /* Init Debug */
327 #define ql_dbg_mbx 0x20000000 /* MBX Debug */
328 #define ql_dbg_disc 0x10000000 /* Device Discovery Debug */
329 #define ql_dbg_io 0x08000000 /* IO Tracing Debug */
330 #define ql_dbg_dpc 0x04000000 /* DPC Thead Debug */
331 #define ql_dbg_async 0x02000000 /* Async events Debug */
332 #define ql_dbg_timer 0x01000000 /* Timer Debug */
333 #define ql_dbg_user 0x00800000 /* User Space Interations Debug */
334 #define ql_dbg_taskm 0x00400000 /* Task Management Debug */
335 #define ql_dbg_aer 0x00200000 /* AER/EEH Debug */
336 #define ql_dbg_multiq 0x00100000 /* MultiQ Debug */
337 #define ql_dbg_p3p 0x00080000 /* P3P specific Debug */
338 #define ql_dbg_vport 0x00040000 /* Virtual Port Debug */
339 #define ql_dbg_buffer 0x00020000 /* For dumping the buffer/regs */
340 #define ql_dbg_misc 0x00010000 /* For dumping everything that is not
341  * not covered by upper categories
342  */
343 #define ql_dbg_verbose 0x00008000 /* More verbosity for each level
344  * This is to be used with other levels where
345  * more verbosity is required. It might not
346  * be applicable to all the levels.
347  */
348 #define ql_dbg_tgt 0x00004000 /* Target mode */
349 #define ql_dbg_tgt_mgt 0x00002000 /* Target mode management */
350 #define ql_dbg_tgt_tmr 0x00001000 /* Target mode task management */