Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / lp486e.c
index 7dda5dd..94d5ea1 100644 (file)
@@ -56,8 +56,6 @@ PORT  SIZE ACTION MEANING
 All other communication is through memory!
 */
 
-#define SLOW_DOWN_IO udelay(5)
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/delay.h>
@@ -70,11 +68,13 @@ All other communication is through memory!
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 
+#define DRV_NAME "lp486e"
+
 /* debug print flags */
 #define LOG_SRCDST    0x80000000
 #define LOG_STATINT   0x40000000
@@ -110,8 +110,10 @@ enum commands {
        CmdDiagnose = 7
 };
 
-char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
-                       "Tx", "TDR", "Dump", "Diagnose" };
+#if 0
+static const char *CUcmdnames[8] = { "NOP", "IASetup", "Configure", "MulticastList",
+                                    "Tx", "TDR", "Dump", "Diagnose" };
+#endif
 
 /* Status word bits */
 #define        STAT_CX         0x8000  /* The CU finished executing a command
@@ -477,7 +479,7 @@ remove_rx_bufs(struct net_device *dev) {
                kfree(rfd);
        } while (rfd != lp->rx_tail);
 
-       lp->rx_tail = 0;
+       lp->rx_tail = NULL;
 
 #if 0
        for (lp->rbd_list) {
@@ -958,7 +960,7 @@ static void print_eth(char *add)
                (unsigned char) add[12], (unsigned char) add[13]);
 }
 
-int __init lp486e_probe(struct net_device *dev) {
+static int __init lp486e_probe(struct net_device *dev) {
        struct i596_private *lp;
        unsigned char eth_addr[6] = { 0, 0xaa, 0, 0, 0, 0 };
        unsigned char *bios;
@@ -970,7 +972,7 @@ int __init lp486e_probe(struct net_device *dev) {
                return -ENODEV;
        probed++;
 
-       if (!request_region(IOADDR, LP486E_TOTAL_SIZE, dev->name)) {
+       if (!request_region(IOADDR, LP486E_TOTAL_SIZE, DRV_NAME)) {
                printk(KERN_ERR "lp486e: IO address 0x%x in use\n", IOADDR);
                return -EBUSY;
        }
@@ -1300,19 +1302,19 @@ MODULE_AUTHOR("Ard van Breemen <ard@cstmel.nl.eu.org>");
 MODULE_DESCRIPTION("Intel Panther onboard i82596 driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(debug, "i");
-//MODULE_PARM(max_interrupt_work, "i");
-//MODULE_PARM(reverse_probe, "i");
-//MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
-
 static struct net_device *dev_lp486e;
 static int full_duplex;
 static int options;
 static int io = IOADDR;
 static int irq = IRQ;
 
+module_param(debug, int, 0);
+//module_param(max_interrupt_work, int, 0);
+//module_param(reverse_probe, int, 0);
+//module_param(rx_copybreak, int, 0);
+module_param(options, int, 0);
+module_param(full_duplex, int, 0);
+
 static int __init lp486e_init_module(void) {
        int err;
        struct net_device *dev = alloc_etherdev(sizeof(struct i596_private));