ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / net / sk98lin / h / skdebug.h
1 /******************************************************************************
2  *
3  * Name:        skdebug.h
4  * Project:     Gigabit Ethernet Adapters, Common Modules
5  * Version:     $Revision: 1.14 $
6  * Date:        $Date: 2003/05/13 17:26:00 $
7  * Purpose:     SK specific DEBUG support
8  *
9  ******************************************************************************/
10
11 /******************************************************************************
12  *
13  *      (C)Copyright 1998-2002 SysKonnect.
14  *      (C)Copyright 2002-2003 Marvell.
15  *
16  *      This program is free software; you can redistribute it and/or modify
17  *      it under the terms of the GNU General Public License as published by
18  *      the Free Software Foundation; either version 2 of the License, or
19  *      (at your option) any later version.
20  *
21  *      The information in this file is provided "AS IS" without warranty.
22  *
23  ******************************************************************************/
24
25 #ifndef __INC_SKDEBUG_H
26 #define __INC_SKDEBUG_H
27
28 #ifdef  DEBUG
29 #ifndef SK_DBG_MSG
30 #define SK_DBG_MSG(pAC,comp,cat,arg) \
31                 if ( ((comp) & SK_DBG_CHKMOD(pAC)) &&   \
32                       ((cat) & SK_DBG_CHKCAT(pAC)) ) {  \
33                         SK_DBG_PRINTF arg ;             \
34                 }
35 #endif
36 #else
37 #define SK_DBG_MSG(pAC,comp,lev,arg)
38 #endif
39
40 /* PLS NOTE:
41  * =========
42  * Due to any restrictions of kernel printf routines do not use other
43  * format identifiers as: %x %d %c %s .
44  * Never use any combined format identifiers such as: %lx %ld in your
45  * printf - argument (arg) because some OS specific kernel printfs may
46  * only support some basic identifiers.
47  */
48
49 /* Debug modules */
50
51 #define SK_DBGMOD_MERR  0x00000001L     /* general module error indication */
52 #define SK_DBGMOD_HWM   0x00000002L     /* Hardware init module */
53 #define SK_DBGMOD_RLMT  0x00000004L     /* RLMT module */
54 #define SK_DBGMOD_VPD   0x00000008L     /* VPD module */
55 #define SK_DBGMOD_I2C   0x00000010L     /* I2C module */
56 #define SK_DBGMOD_PNMI  0x00000020L     /* PNMI module */
57 #define SK_DBGMOD_CSUM  0x00000040L     /* CSUM module */
58 #define SK_DBGMOD_ADDR  0x00000080L     /* ADDR module */
59 #define SK_DBGMOD_PECP  0x00000100L     /* PECP module */
60 #define SK_DBGMOD_POWM  0x00000200L     /* Power Management module */
61
62 /* Debug events */
63
64 #define SK_DBGCAT_INIT  0x00000001L     /* module/driver initialization */
65 #define SK_DBGCAT_CTRL  0x00000002L     /* controlling devices */
66 #define SK_DBGCAT_ERR   0x00000004L     /* error handling paths */
67 #define SK_DBGCAT_TX    0x00000008L     /* transmit path */
68 #define SK_DBGCAT_RX    0x00000010L     /* receive path */
69 #define SK_DBGCAT_IRQ   0x00000020L     /* general IRQ handling */
70 #define SK_DBGCAT_QUEUE 0x00000040L     /* any queue management */
71 #define SK_DBGCAT_DUMP  0x00000080L     /* large data output e.g. hex dump */
72 #define SK_DBGCAT_FATAL 0x00000100L     /* fatal error */
73
74 #endif  /* __INC_SKDEBUG_H */