]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - drivers/net/wan/lmc/lmc_debug.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / drivers / net / wan / lmc / lmc_debug.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2#ifndef _LMC_DEBUG_H_
3#define _LMC_DEBUG_H_
4
5#ifdef DEBUG
6#ifdef LMC_PACKET_LOG
7#define LMC_CONSOLE_LOG(x,y,z) lmcConsoleLog((x), (y), (z))
8#else
9#define LMC_CONSOLE_LOG(x,y,z)
10#endif
11#else
12#define LMC_CONSOLE_LOG(x,y,z)
13#endif
14
15
16
17/* Debug --- Event log definitions --- */
18/* EVENTLOGSIZE*EVENTLOGARGS needs to be a power of 2 */
19#define LMC_EVENTLOGSIZE 1024 /* number of events in eventlog */
20#define LMC_EVENTLOGARGS 4 /* number of args for each event */
21
22/* event indicators */
23#define LMC_EVENT_XMT 1
24#define LMC_EVENT_XMTEND 2
25#define LMC_EVENT_XMTINT 3
26#define LMC_EVENT_RCVINT 4
27#define LMC_EVENT_RCVEND 5
28#define LMC_EVENT_INT 6
29#define LMC_EVENT_XMTINTTMO 7
30#define LMC_EVENT_XMTPRCTMO 8
31#define LMC_EVENT_INTEND 9
32#define LMC_EVENT_RESET1 10
33#define LMC_EVENT_RESET2 11
34#define LMC_EVENT_FORCEDRESET 12
35#define LMC_EVENT_WATCHDOG 13
36#define LMC_EVENT_BADPKTSURGE 14
37#define LMC_EVENT_TBUSY0 15
38#define LMC_EVENT_TBUSY1 16
39
40
41#ifdef DEBUG
867240f7
KH
42extern u32 lmcEventLogIndex;
43extern u32 lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS];
1da177e4
LT
44#define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z))
45#else
46#define LMC_EVENT_LOG(x,y,z)
47#endif /* end ifdef _DBG_EVENTLOG */
48
49void lmcConsoleLog(char *type, unsigned char *ucData, int iLen);
867240f7 50void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3);
1da177e4
LT
51void lmc_trace(struct net_device *dev, char *msg);
52
53#endif