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