fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / net / eepro.c
index a806dfe..b446309 100644 (file)
@@ -154,7 +154,7 @@ static const char version[] =
 #include <asm/dma.h>
 
 #define DRV_NAME "eepro"
-#define DRV_VERSION "0.13b"
+#define DRV_VERSION "0.13c"
 
 #define compat_dev_kfree_skb( skb, mode ) dev_kfree_skb( (skb) )
 /* I had reports of looong delays with SLOW_DOWN defined as udelay(2) */
@@ -311,7 +311,7 @@ struct eepro_local {
 static int     eepro_probe1(struct net_device *dev, int autoprobe);
 static int     eepro_open(struct net_device *dev);
 static int     eepro_send_packet(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t eepro_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t eepro_interrupt(int irq, void *dev_id);
 static void    eepro_rx(struct net_device *dev);
 static void    eepro_transmit_interrupt(struct net_device *dev);
 static int     eepro_close(struct net_device *dev);
@@ -743,7 +743,7 @@ static void __init eepro_print_info (struct net_device *dev)
                printEEPROMInfo(dev);
 }
 
-static struct ethtool_ops eepro_ethtool_ops;
+static const struct ethtool_ops eepro_ethtool_ops;
 
 /* This is the real probe routine.  Linux has a history of friendly device
    probes on the ISA bus.  A good device probe avoids doing writes, and
@@ -920,7 +920,7 @@ static int  eepro_grab_irq(struct net_device *dev)
 
                eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */
 
-               if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != EBUSY) {
+               if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != EBUSY) {
                        unsigned long irq_mask;
                        /* Twinkle the interrupt, and check if it's seen */
                        irq_mask = probe_irq_on();
@@ -994,16 +994,6 @@ static int eepro_open(struct net_device *dev)
                return -EAGAIN;
        }
 
-#ifdef irq2dev_map
-       if  (((irq2dev_map[dev->irq] != 0)
-               || (irq2dev_map[dev->irq] = dev) == 0) &&
-               (irq2dev_map[dev->irq]!=dev)) {
-               /* printk("%s: IRQ map wrong\n", dev->name); */
-               free_irq(dev->irq, dev);
-               return -EAGAIN;
-       }
-#endif
-
        /* Initialize the 82595. */
 
        eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */
@@ -1154,8 +1144,7 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
                printk(KERN_DEBUG  "%s: entering eepro_send_packet routine.\n", dev->name);
 
        if (length < ETH_ZLEN) {
-               skb = skb_padto(skb, ETH_ZLEN);
-               if (skb == NULL)
+               if (skb_padto(skb, ETH_ZLEN))
                        return 0;
                length = ETH_ZLEN;
        }
@@ -1197,19 +1186,13 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev)
        Handle the network interface interrupts. */
 
 static irqreturn_t
-eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+eepro_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev =  (struct net_device *)dev_id;
-                             /* (struct net_device *)(irq2dev_map[irq]);*/
+       struct net_device *dev = dev_id;
        struct eepro_local *lp;
        int ioaddr, status, boguscount = 20;
        int handled = 0;
 
-       if (dev == NULL) {
-                printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq);
-                return IRQ_NONE;
-        }
-
        lp = netdev_priv(dev);
 
         spin_lock(&lp->lock);
@@ -1289,10 +1272,6 @@ static int eepro_close(struct net_device *dev)
        /* release the interrupt */
        free_irq(dev->irq, dev);
 
-#ifdef irq2dev_map
-       irq2dev_map[dev->irq] = 0;
-#endif
-
        /* Update the statistics here. What statistics? */
 
        return 0;
@@ -1334,7 +1313,6 @@ set_multicast_list(struct net_device *dev)
                mode = inb(ioaddr + REG3);
                outb(mode, ioaddr + REG3); /* writing reg. 3 to complete the update */
                eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */
-               printk(KERN_INFO "%s: promiscuous mode enabled.\n", dev->name);
        }
 
        else if (dev->mc_count==0 )
@@ -1773,7 +1751,7 @@ static void eepro_ethtool_get_drvinfo(struct net_device *dev,
        sprintf(drvinfo->bus_info, "ISA 0x%lx", dev->base_addr);
 }
 
-static struct ethtool_ops eepro_ethtool_ops = {
+static const struct ethtool_ops eepro_ethtool_ops = {
        .get_settings   = eepro_ethtool_get_settings,
        .get_drvinfo    = eepro_ethtool_get_drvinfo,
 };
@@ -1808,8 +1786,7 @@ MODULE_PARM_DESC(irq, "EtherExpress Pro/10 IRQ number(s)");
 MODULE_PARM_DESC(mem, "EtherExpress Pro/10 Rx buffer size(es) in kB (3-29)");
 MODULE_PARM_DESC(autodetect, "EtherExpress Pro/10 force board(s) detection (0-1)");
 
-int
-init_module(void)
+int __init init_module(void)
 {
        struct net_device *dev;
        int i;
@@ -1850,7 +1827,7 @@ init_module(void)
        return n_eepro ? 0 : -ENODEV;
 }
 
-void
+void __exit
 cleanup_module(void)
 {
        int i;