Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lmc_debug.h
Go to the documentation of this file.
1 #ifndef _LMC_DEBUG_H_
2 #define _LMC_DEBUG_H_
3 
4 #ifdef DEBUG
5 #ifdef LMC_PACKET_LOG
6 #define LMC_CONSOLE_LOG(x,y,z) lmcConsoleLog((x), (y), (z))
7 #else
8 #define LMC_CONSOLE_LOG(x,y,z)
9 #endif
10 #else
11 #define LMC_CONSOLE_LOG(x,y,z)
12 #endif
13 
14 
15 
16 /* Debug --- Event log definitions --- */
17 /* EVENTLOGSIZE*EVENTLOGARGS needs to be a power of 2 */
18 #define LMC_EVENTLOGSIZE 1024 /* number of events in eventlog */
19 #define LMC_EVENTLOGARGS 4 /* number of args for each event */
20 
21 /* event indicators */
22 #define LMC_EVENT_XMT 1
23 #define LMC_EVENT_XMTEND 2
24 #define LMC_EVENT_XMTINT 3
25 #define LMC_EVENT_RCVINT 4
26 #define LMC_EVENT_RCVEND 5
27 #define LMC_EVENT_INT 6
28 #define LMC_EVENT_XMTINTTMO 7
29 #define LMC_EVENT_XMTPRCTMO 8
30 #define LMC_EVENT_INTEND 9
31 #define LMC_EVENT_RESET1 10
32 #define LMC_EVENT_RESET2 11
33 #define LMC_EVENT_FORCEDRESET 12
34 #define LMC_EVENT_WATCHDOG 13
35 #define LMC_EVENT_BADPKTSURGE 14
36 #define LMC_EVENT_TBUSY0 15
37 #define LMC_EVENT_TBUSY1 16
38 
39 
40 #ifdef DEBUG
41 extern u32 lmcEventLogIndex;
42 extern u32 lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS];
43 #define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z))
44 #else
45 #define LMC_EVENT_LOG(x,y,z)
46 #endif /* end ifdef _DBG_EVENTLOG */
47 
48 void lmcConsoleLog(char *type, unsigned char *ucData, int iLen);
49 void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3);
50 void lmc_trace(struct net_device *dev, char *msg);
51 
52 #endif