lmc_debug.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef _LMC_DEBUG_H_
  2. #define _LMC_DEBUG_H_
  3. #ifdef DEBUG
  4. #ifdef LMC_PACKET_LOG
  5. #define LMC_CONSOLE_LOG(x,y,z) lmcConsoleLog((x), (y), (z))
  6. #else
  7. #define LMC_CONSOLE_LOG(x,y,z)
  8. #endif
  9. #else
  10. #define LMC_CONSOLE_LOG(x,y,z)
  11. #endif
  12. /* Debug --- Event log definitions --- */
  13. /* EVENTLOGSIZE*EVENTLOGARGS needs to be a power of 2 */
  14. #define LMC_EVENTLOGSIZE 1024 /* number of events in eventlog */
  15. #define LMC_EVENTLOGARGS 4 /* number of args for each event */
  16. /* event indicators */
  17. #define LMC_EVENT_XMT 1
  18. #define LMC_EVENT_XMTEND 2
  19. #define LMC_EVENT_XMTINT 3
  20. #define LMC_EVENT_RCVINT 4
  21. #define LMC_EVENT_RCVEND 5
  22. #define LMC_EVENT_INT 6
  23. #define LMC_EVENT_XMTINTTMO 7
  24. #define LMC_EVENT_XMTPRCTMO 8
  25. #define LMC_EVENT_INTEND 9
  26. #define LMC_EVENT_RESET1 10
  27. #define LMC_EVENT_RESET2 11
  28. #define LMC_EVENT_FORCEDRESET 12
  29. #define LMC_EVENT_WATCHDOG 13
  30. #define LMC_EVENT_BADPKTSURGE 14
  31. #define LMC_EVENT_TBUSY0 15
  32. #define LMC_EVENT_TBUSY1 16
  33. #ifdef DEBUG
  34. extern u32 lmcEventLogIndex;
  35. extern u32 lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS];
  36. #define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z))
  37. #else
  38. #define LMC_EVENT_LOG(x,y,z)
  39. #endif /* end ifdef _DBG_EVENTLOG */
  40. void lmcConsoleLog(char *type, unsigned char *ucData, int iLen);
  41. void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3);
  42. void lmc_trace(struct net_device *dev, char *msg);
  43. #endif