From: Manfred Spraul <manfred@colorfullife.com>

Ok, and attached is the patch that updates your tree to 0.18.

- double spin_lock during open()
- wrong packet size passed to hardware (1 byte kernel data leak/packet 
  and MTU+1 sized packets are rejected by most link partners)
- the ppc64 compile bugfix
- move the register_netdev call a few lines down - dev->get_stats must 
  be initialized before calling register_netdev, otherwise it can oops.


One thing is odd: in your forcedeth.patch, the last two lines of the 
driver are missing: the module_exit()/module_init() macros. I think I 
never generated a patch that removed them - at least I can't find 
anything in my patch list.

Is that an intentional change? I think the driver won't work without the 
module_{init,exit} statements. I've added them back in.



 25-akpm/drivers/net/forcedeth.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff -puN drivers/net/forcedeth.c~forcedeth-update-2 drivers/net/forcedeth.c
--- 25/drivers/net/forcedeth.c~forcedeth-update-2	Tue Nov 18 13:51:45 2003
+++ 25-akpm/drivers/net/forcedeth.c	Tue Nov 18 13:51:45 2003
@@ -55,13 +55,14 @@
  * 			   increased to 1628 bytes.
  * 	0.17: 16 Nov 2003: undo rx buffer size increase. Substract 1 from
  * 			   the tx length.
+ * 	0.18: 17 Nov 2003: fix oops due to late initialization of dev_stats
  *
  * Known bugs:
  * The irq handling is wrong - no tx done interrupts are generated.
  * This means recovery from netif_stop_queue only happens in the hw timer
  * interrupt (1/2 second), or if an rx packet arrives by chance.
  */
-#define FORCEDETH_VERSION		"0.17"
+#define FORCEDETH_VERSION		"0.18"
 
 #include <linux/module.h>
 #include <linux/types.h>
@@ -1278,15 +1279,6 @@ static int __devinit probe_nic(struct pc
 		goto out_unmap;
 	np->tx_ring = &np->rx_ring[RX_RING];
 
-	err = register_netdev(dev);
-	if (err) {
-		printk(KERN_INFO "forcedeth: unable to register netdev: %d\n", err);
-		goto out_freering;
-	}
-
-	printk(KERN_INFO "%s: forcedeth.c: subsystem: %05x:%04x\n",
-			dev->name, pci_dev->subsystem_vendor, pci_dev->subsystem_device);
-
 	dev->open = open;
 	dev->stop = close;
 	dev->hard_start_xmit = start_xmit;
@@ -1299,6 +1291,16 @@ static int __devinit probe_nic(struct pc
 
 	pci_set_drvdata(pci_dev, dev);
 
+	err = register_netdev(dev);
+	if (err) {
+		printk(KERN_INFO "forcedeth: unable to register netdev: %d\n", err);
+		goto out_freering;
+	}
+
+	printk(KERN_INFO "%s: forcedeth.c: subsystem: %05x:%04x\n",
+			dev->name, pci_dev->subsystem_vendor, pci_dev->subsystem_device);
+
+
 	/* read the mac address */
 	base = get_hwbase(dev);
 	np->orig_mac[0] = readl(base + NvRegMacAddrA);
@@ -1414,3 +1416,5 @@ MODULE_LICENSE("GPL");
 
 MODULE_DEVICE_TABLE(pci, pci_tbl);
 
+module_init(init_nic);
+module_exit(exit_nic);

_