Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 33 → Rev 34

/shark/trunk/drivers/linuxcom/include/linux/netdevice.h
8,12 → 8,21
 
#include <linux/skbuff.h>
#include <linux/notifier.h>
#include <time.h>
 
// for 3c59x.c (!!!)
#define le32_to_cpu(val) (val)
#define cpu_to_le32(val) (val)
#define test_and_set_bit(val, addr) set_bit(val, addr)
#define mdelay(x) task_delay((x)*1000)
 
static __inline__ void mdelay(int x)
{
struct timespec delay;
delay.tv_sec=x/1000;
delay.tv_nsec=(x%1000)*1000000;
nanosleep(&delay, NULL);
}
 
#define kfree(x) { }
#define ioremap(a,b) \
(((a)<0x100000) ? (void *)((u_long)(a)) : vremap(a,b))
/shark/trunk/drivers/linuxcom/auto_irq.c
1,5 → 1,6
#include<asm/bitops.h>
#include<kernel/kern.h>
#include <time.h>
 
struct device *irq2dev_map[16] = {0, 0, /* ... zeroed */};
 
17,6 → 18,7
int autoirq_setup(int waittime)
{
int i;
struct timespec delay;
 
handled = 0;
 
27,7 → 29,9
}
 
/* Hang out at least <waittime> jiffies waiting for bogus IRQ hits. */
task_delay(waittime);
delay.tv_sec = waittime/1000000;
delay.tv_nsec = (waittime%1000000)*1000;
nanosleep(&delay, NULL);
 
return handled;
}
34,10 → 38,13
 
int autoirq_report(int waittime)
{
struct timespec delay;
int i;
 
/* Hang out at least <waittime> jiffies waiting for the IRQ. */
task_delay(waittime);
delay.tv_sec=waittime/1000000;
delay.tv_nsec=(waittime%1000000)*1000;
nanosleep(&delay, NULL);
 
/* Retract the irq handlers that we installed. */
for (i = 0; i < 16; i++) {