vserver 1.9.5.x5
[linux-2.6.git] / drivers / net / fealnx.c
index b0fbb86..bd4e571 100644 (file)
@@ -85,9 +85,9 @@ static int full_duplex[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
 #include <linux/ethtool.h>
 #include <linux/crc32.h>
 #include <linux/delay.h>
+#include <linux/bitops.h>
 
 #include <asm/processor.h>     /* Processor type for cache alignment. */
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
@@ -125,13 +125,13 @@ KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE "\n";
 MODULE_AUTHOR("Myson or whoever");
 MODULE_DESCRIPTION("Myson MTD-8xx 100/10M Ethernet PCI Adapter Driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(max_interrupt_work, "i");
+module_param(max_interrupt_work, int, 0);
 //MODULE_PARM(min_pci_latency, "i");
-MODULE_PARM(debug, "i");
-MODULE_PARM(rx_copybreak, "i");
-MODULE_PARM(multicast_filter_limit, "i");
-MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
-MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
+module_param(debug, int, 0);
+module_param(rx_copybreak, int, 0);
+module_param(multicast_filter_limit, int, 0);
+module_param_array(options, int, NULL, 0);
+module_param_array(full_duplex, int, NULL, 0);
 MODULE_PARM_DESC(max_interrupt_work, "fealnx maximum events handled per interrupt");
 MODULE_PARM_DESC(debug, "fealnx enable debugging (0-1)");
 MODULE_PARM_DESC(rx_copybreak, "fealnx copy breakpoint for copy-only-tiny-frames");
@@ -858,12 +858,17 @@ static int netdev_open(struct net_device *dev)
 {
        struct netdev_private *np = dev->priv;
        long ioaddr = dev->base_addr;
+       int i;
 
        writel(0x00000001, ioaddr + BCR);       /* Reset */
 
        if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev))
                return -EAGAIN;
 
+       for (i = 0; i < 3; i++)
+               writew(((unsigned short*)dev->dev_addr)[i],
+                               ioaddr + PAR0 + i*2);
+
        init_ring(dev);
 
        writel(np->rx_ring_dma, ioaddr + RXLBA);