2 #include <linux/types.h>
3 #include <linux/netdevice.h>
4 #include <linux/interrupt.h>
9 * Prints out len, max to 80 octets using printk, 20 per line
11 void lmcConsoleLog(char *type
, unsigned char *ucData
, int iLen
)
18 sprintf(str
, KERN_DEBUG
"lmc: %s: ", type
);
19 pstr
= str
+strlen(str
);
22 printk(KERN_DEBUG
"lmc: Printing 240 chars... out of: %d\n", iLen
);
26 printk(KERN_DEBUG
"lmc: Printing %d chars\n", iLen
);
31 sprintf(pstr
, "%02x ", *ucData
);
38 sprintf(str
, KERN_DEBUG
"lmc: %s: ", type
);
51 u_int32_t lmcEventLogIndex
= 0;
52 u_int32_t lmcEventLogBuf
[LMC_EVENTLOGSIZE
* LMC_EVENTLOGARGS
];
55 void lmcEventLog (u_int32_t EventNum
, u_int32_t arg2
, u_int32_t arg3
)
58 lmcEventLogBuf
[lmcEventLogIndex
++] = EventNum
;
59 lmcEventLogBuf
[lmcEventLogIndex
++] = arg2
;
60 lmcEventLogBuf
[lmcEventLogIndex
++] = arg3
;
61 lmcEventLogBuf
[lmcEventLogIndex
++] = jiffies
;
63 lmcEventLogIndex
&= (LMC_EVENTLOGSIZE
* LMC_EVENTLOGARGS
) - 1;
67 void lmc_trace(struct net_device
*dev
, char *msg
){
69 unsigned long j
= jiffies
+ 3; /* Wait for 50 ms */
72 printk("%s: * %s\n", dev
->name
, msg
);
73 // while(time_before(jiffies, j+10))
77 printk("%s: %s\n", dev
->name
, msg
);
78 while(time_before(jiffies
, j
))
85 /* --------------------------- end if_lmc_linux.c ------------------------ */