Re: Oops in test10 during module loading of 3c509

From: Luca Giuzzi (giuzzi@dmf.bs.unicatt.it)
Date: Wed Nov 01 2000 - 16:03:05 EST


It seems the cleaning up of the network drivers has been a tad too
 aggressive :) There is no init_etherdev() anymore in 3c509.c

The following patch seems to solve the problem.
(the code is taken from a working test10pre5)

Cheers,
 lg

--- 3c509.c.test10-broken Wed Nov 1 17:12:08 2000
+++ 3c509.c Wed Nov 1 17:13:37 2000
@@ -434,6 +434,13 @@
         /* Free the interrupt so that some other card can use it. */
         outw(0x0f00, ioaddr + WN0_IRQ);
  found:
+ if (dev == NULL) {
+ dev = init_etherdev(dev, sizeof(struct el3_private));
+ if (dev == NULL) {
+ release_region(ioaddr, EL3_IO_EXTENT);
+ return -ENOMEM;
+ }
+ }
         memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
         dev->base_addr = ioaddr;
         dev->irq = irq;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Nov 07 2000 - 21:00:10 EST