skdebug.h 2.7 KB

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