fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / de600.c
index 0e8b077..8396e41 100644 (file)
@@ -43,7 +43,6 @@ static const char version[] = "de600.c: $Revision: 1.41-2.5 $,  Bjorn Ekwall (bj
  * modify the following "#define": (see <asm/io.h> 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);