aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.h
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2011-07-14 15:00:12 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 06:12:25 -0400
commit3ce8866ceae87258cf66d1f7fd72abc918753cec (patch)
tree655dbace6c920da216275b9145f20a8515c808f9 /drivers/scsi/qla2xxx/qla_dbg.h
parent573e5913536a1393362265cfea9e708aa10fdf16 (diff)
[SCSI] qla2xxx: Basic infrastructure for dynamic logging.
This patch adds the dynamic logging framework to the qla2xxx driver. The user will be able to change the logging levels on the fly i.e. without load/unload of the driver. This also enables logging to be enabled for a particular section of the driver such as initialization, device discovery etc. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h
index 930414541ec6..f955094fd5d8 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.h
+++ b/drivers/scsi/qla2xxx/qla_dbg.h
@@ -370,3 +370,50 @@ struct qla2xxx_fw_dump {
370 struct qla81xx_fw_dump isp81; 370 struct qla81xx_fw_dump isp81;
371 } isp; 371 } isp;
372}; 372};
373
374#define QL_MSGHDR "qla2xxx"
375
376#define ql_log_fatal 0 /* display fatal errors */
377#define ql_log_warn 1 /* display critical errors */
378#define ql_log_info 2 /* display all recovered errors */
379#define ql_log_all 3 /* This value is only used by ql_errlev.
380 * No messages will use this value.
381 * This should be always highest value
382 * as compared to other log levels.
383 */
384
385extern int ql_errlev;
386
387void
388ql_dbg(uint32_t, scsi_qla_host_t *vha, int32_t, char *, ...);
389void
390ql_dbg_pci(uint32_t, struct pci_dev *pdev, int32_t, char *, ...);
391
392void
393ql_log(uint32_t, scsi_qla_host_t *vha, int32_t, char *, ...);
394void
395ql_log_pci(uint32_t, struct pci_dev *pdev, int32_t, char *, ...);
396
397/* Debug Levels */
398/* The 0x40000000 is the max value any debug level can have
399 * as ql2xextended_error_logging is of type signed int
400 */
401#define ql_dbg_init 0x40000000 /* Init Debug */
402#define ql_dbg_mbx 0x20000000 /* MBX Debug */
403#define ql_dbg_disc 0x10000000 /* Device Discovery Debug */
404#define ql_dbg_io 0x08000000 /* IO Tracing Debug */
405#define ql_dbg_dpc 0x04000000 /* DPC Thead Debug */
406#define ql_dbg_async 0x02000000 /* Async events Debug */
407#define ql_dbg_timer 0x01000000 /* Timer Debug */
408#define ql_dbg_user 0x00800000 /* User Space Interations Debug */
409#define ql_dbg_taskm 0x00400000 /* Task Management Debug */
410#define ql_dbg_aer 0x00200000 /* AER/EEH Debug */
411#define ql_dbg_multiq 0x00100000 /* MultiQ Debug */
412#define ql_dbg_p3p 0x00080000 /* P3P specific Debug */
413#define ql_dbg_vport 0x00040000 /* Virtual Port Debug */
414#define ql_dbg_buffer 0x00020000 /* For dumping the buffer/regs */
415#define ql_dbg_misc 0x00010000 /* For dumping everything that is not
416 * not covered by upper categories
417 */
418
419#define QL_DBG_BUF_LEN 512