X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Fde600.c;h=8396e411f1ce7b59088e2b8f5667ca5d01a789c4;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=0e8b0771e67c84889efeb273d4ae678fe2378698;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/net/de600.c b/drivers/net/de600.c index 0e8b0771e..8396e411f 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c @@ -43,7 +43,6 @@ static const char version[] = "de600.c: $Revision: 1.41-2.5 $, Bjorn Ekwall (bj * modify the following "#define": (see for more info) #define REALLY_SLOW_IO */ -#define SLOW_IO_BY_JUMPING /* Looks "better" than dummy write to port 0x80 :-) */ /* use 0 for production, 1 for verification, >2 for debug */ #ifdef DE600_DEBUG @@ -75,15 +74,15 @@ static const char version[] = "de600.c: $Revision: 1.41-2.5 $, Bjorn Ekwall (bj #include "de600.h" static unsigned int de600_debug = DE600_DEBUG; -MODULE_PARM(de600_debug, "i"); +module_param(de600_debug, int, 0); MODULE_PARM_DESC(de600_debug, "DE-600 debug level (0-2)"); static unsigned int check_lost = 1; -MODULE_PARM(check_lost, "i"); +module_param(check_lost, bool, 0); MODULE_PARM_DESC(check_lost, "If set then check for unplugged de600"); static unsigned int delay_time = 10; -MODULE_PARM(delay_time, "i"); +module_param(delay_time, int, 0); MODULE_PARM_DESC(delay_time, "DE-600 deley on I/O in microseconds"); @@ -99,7 +98,7 @@ static volatile int tx_fifo_in; static volatile int tx_fifo_out; static volatile int free_tx_pages = TX_PAGES; static int was_down; -static spinlock_t de600_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(de600_lock); static inline u8 de600_read_status(struct net_device *dev) { @@ -179,7 +178,7 @@ static inline void trigger_interrupt(struct net_device *dev) * Copy a buffer to the adapter transmit page memory. * Start sending. */ - + static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned long flags; @@ -258,21 +257,15 @@ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) * Handle the network interface interrupts. */ -static irqreturn_t de600_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t de600_interrupt(int irq, void *dev_id) { struct net_device *dev = dev_id; u8 irq_status; int retrig = 0; int boguscount = 0; - /* This might just as well be deleted now, no crummy drivers present :-) */ - if ((dev == NULL) || (DE600_IRQ != irq)) { - printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); - return IRQ_NONE; - } - spin_lock(&de600_lock); - + select_nic(); irq_status = de600_read_status(dev);