8390 based driver cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

While we are in cleanup mode, the last vestiges of the 8390
autoload hackery can be swept away as well.  You may have to
patch with fuzz if your ne.c and ne2k-pci.c are already with
the other patch we've bounced around (or just delete the
[un]load_8390_module() by hand) as this was against test10-pre6.

Thanks,
Paul.
diff -ur 2400-t10-p6/linux/drivers/net-old/3c503.c 2400-t10-p6/linux/drivers/net/3c503.c
--- 2400-t10-p6/linux/drivers/net-old/3c503.c	Mon Sep 11 03:55:09 2000
+++ 2400-t10-p6/linux/drivers/net/3c503.c	Tue Oct 31 19:11:45 2000
@@ -645,9 +645,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("3c503.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
 		struct net_device *dev = &dev_el2[this_dev];
 		dev->irq = irq[this_dev];
@@ -663,7 +660,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -686,7 +682,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/ac3200.c 2400-t10-p6/linux/drivers/net/ac3200.c
--- 2400-t10-p6/linux/drivers/net-old/ac3200.c	Mon Sep 11 03:55:09 2000
+++ 2400-t10-p6/linux/drivers/net/ac3200.c	Tue Oct 31 19:14:21 2000
@@ -368,9 +368,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("ac3200.c"))
-			return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_AC32_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ac32[this_dev];
 		dev->irq = irq[this_dev];
@@ -384,7 +381,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -410,7 +406,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/apne.c 2400-t10-p6/linux/drivers/net/apne.c
--- 2400-t10-p6/linux/drivers/net-old/apne.c	Wed Jun 28 11:38:16 2000
+++ 2400-t10-p6/linux/drivers/net/apne.c	Tue Oct 31 19:18:26 2000
@@ -570,13 +570,9 @@
 {
 	int err;
 
-	if (load_8390_module("apne.c"))
-		return -ENOSYS;
-
 	if ((err = register_netdev(&apne_dev))) {
 		if (err == -EIO)
 			printk("No PCMCIA NEx000 ethernet card found.\n");
-		unload_8390_module();
 		return (err);
 	}
 	return (0);
@@ -591,8 +587,6 @@
 	free_irq(IRQ_AMIGA_PORTS, &apne_dev);
 
 	pcmcia_reset();
-
-	unload_8390_module();
 
 	apne_owned = 0;
 }
diff -ur 2400-t10-p6/linux/drivers/net-old/ariadne2.c 2400-t10-p6/linux/drivers/net/ariadne2.c
--- 2400-t10-p6/linux/drivers/net-old/ariadne2.c	Sat Oct 28 14:35:30 2000
+++ 2400-t10-p6/linux/drivers/net/ariadne2.c	Tue Oct 31 19:18:38 2000
@@ -401,13 +401,9 @@
 {
     int err;
 
-    if (load_8390_module("ariadne2.c"))
-	return -ENOSYS;
-
     if ((err = register_netdev(&ariadne2_dev))) {
 	if (err == -EIO)
 	    printk("No AriadNE2 ethernet card found.\n");
-	unload_8390_module();
 	return err;
     }
     return 0;
@@ -418,7 +414,6 @@
     free_irq(IRQ_AMIGA_PORTS, &ariadne2_dev);
     release_mem_region(ZTWO_PADDR(ariadne2_dev.base_addr), NE_IO_EXTENT*2);
     unregister_netdev(&ariadne2_dev);
-    unload_8390_module();
 }
 
 #endif	/* MODULE */
diff -ur 2400-t10-p6/linux/drivers/net-old/e2100.c 2400-t10-p6/linux/drivers/net/e2100.c
--- 2400-t10-p6/linux/drivers/net-old/e2100.c	Sat Oct 28 14:35:31 2000
+++ 2400-t10-p6/linux/drivers/net/e2100.c	Tue Oct 31 19:14:30 2000
@@ -407,9 +407,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("e2100.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_E21_CARDS; this_dev++) {
 		struct net_device *dev = &dev_e21[this_dev];
 		dev->irq = irq[this_dev];
@@ -426,7 +423,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -449,7 +445,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/es3210.c 2400-t10-p6/linux/drivers/net/es3210.c
--- 2400-t10-p6/linux/drivers/net-old/es3210.c	Sat Oct 28 14:35:31 2000
+++ 2400-t10-p6/linux/drivers/net/es3210.c	Tue Oct 31 19:10:50 2000
@@ -401,9 +401,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("es3210.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_ES_CARDS; this_dev++) {
 		struct net_device *dev = &dev_es3210[this_dev];
 		dev->irq = irq[this_dev];
@@ -417,7 +414,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -440,6 +436,5 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
diff -ur 2400-t10-p6/linux/drivers/net-old/hp-plus.c 2400-t10-p6/linux/drivers/net/hp-plus.c
--- 2400-t10-p6/linux/drivers/net-old/hp-plus.c	Wed Jun 28 11:38:23 2000
+++ 2400-t10-p6/linux/drivers/net/hp-plus.c	Tue Oct 31 19:14:51 2000
@@ -433,9 +433,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("hp-plus.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_HPP_CARDS; this_dev++) {
 		struct net_device *dev = &dev_hpp[this_dev];
 		dev->irq = irq[this_dev];
@@ -450,7 +447,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -474,7 +470,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/hp.c 2400-t10-p6/linux/drivers/net/hp.c
--- 2400-t10-p6/linux/drivers/net-old/hp.c	Wed Jun 28 11:38:23 2000
+++ 2400-t10-p6/linux/drivers/net/hp.c	Tue Oct 31 19:14:41 2000
@@ -404,9 +404,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("hp.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_HP_CARDS; this_dev++) {
 		struct net_device *dev = &dev_hp[this_dev];
 		dev->irq = irq[this_dev];
@@ -421,7 +418,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -445,7 +441,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/lne390.c 2400-t10-p6/linux/drivers/net/lne390.c
--- 2400-t10-p6/linux/drivers/net-old/lne390.c	Sat Oct 28 14:35:33 2000
+++ 2400-t10-p6/linux/drivers/net/lne390.c	Tue Oct 31 19:11:01 2000
@@ -394,9 +394,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("lne390.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_LNE_CARDS; this_dev++) {
 		struct net_device *dev = &dev_lne[this_dev];
 		dev->irq = irq[this_dev];
@@ -410,7 +407,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -434,7 +430,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/ne.c 2400-t10-p6/linux/drivers/net/ne.c
--- 2400-t10-p6/linux/drivers/net-old/ne.c	Tue Jul 11 02:29:10 2000
+++ 2400-t10-p6/linux/drivers/net/ne.c	Tue Oct 31 19:12:07 2000
@@ -836,9 +836,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("ne.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ne[this_dev];
 		dev->irq = irq[this_dev];
@@ -856,7 +853,6 @@
 			printk(KERN_WARNING "ne.c: No NE*000 card found at i/o = %#x\n", io[this_dev]);
 		else
 			printk(KERN_NOTICE "ne.c: No PCI cards found. Use \"io=0xNNN\" value(s) for ISA cards.\n");
-		unload_8390_module();
 		return -ENXIO;
 	}
 	return 0;
@@ -879,7 +875,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/ne2k-pci.c 2400-t10-p6/linux/drivers/net/ne2k-pci.c
--- 2400-t10-p6/linux/drivers/net-old/ne2k-pci.c	Fri Oct 27 17:46:08 2000
+++ 2400-t10-p6/linux/drivers/net/ne2k-pci.c	Tue Oct 31 19:14:11 2000
@@ -559,29 +559,13 @@
 
 static int __init ne2k_pci_init(void)
 {
-	int rc;
-	
-	if (load_8390_module("ne2k-pci.c"))
-		return -ENOSYS;
-	
-	rc = pci_module_init (&ne2k_driver);
-	
-	/* XXX should this test CONFIG_HOTPLUG like pci_module_init? */
-
-	/* YYY No. If we're returning non-zero, we're being unloaded
-	 * 	   immediately. dwmw2 
-	 */
-	if (rc <= 0)
-		unload_8390_module();
-
-	return rc;
+	return (pci_module_init(&ne2k_driver));
 }
 
 
 static void __exit ne2k_pci_cleanup(void)
 {
-	pci_unregister_driver (&ne2k_driver);
-	unload_8390_module();
+	pci_unregister_driver(&ne2k_driver);
 }
 
 module_init(ne2k_pci_init);
diff -ur 2400-t10-p6/linux/drivers/net-old/ne3210.c 2400-t10-p6/linux/drivers/net/ne3210.c
--- 2400-t10-p6/linux/drivers/net-old/ne3210.c	Sat Oct 28 14:35:33 2000
+++ 2400-t10-p6/linux/drivers/net/ne3210.c	Tue Oct 31 19:11:11 2000
@@ -381,9 +381,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("ne3210.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_NE3210_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ne3210[this_dev];
 		dev->irq = irq[this_dev];
@@ -397,7 +394,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -421,7 +417,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/oaknet.c 2400-t10-p6/linux/drivers/net/oaknet.c
--- 2400-t10-p6/linux/drivers/net-old/oaknet.c	Wed Jun 28 11:38:25 2000
+++ 2400-t10-p6/linux/drivers/net/oaknet.c	Tue Oct 31 19:47:23 2000
@@ -664,25 +664,10 @@
  */
 static int __init oaknet_init_module (void)
 {
-	int status;
-
-	/*
-	 * We're dependent on the 8390 generic driver module, make
-	 * sure its symbols are loaded.
-	 */
-
-	if (load_8390_module("oaknet.c"))
-		return (-ENOSYS);
-
 	if (oaknet_devs != NULL)
 		return (-EBUSY);
 
-	status = oaknet_init()
-
-	if (status != 0)
-		unload_8390_module();
-
-	return (status);
+	return (oaknet_init());
 }
 
 /*
@@ -704,7 +689,6 @@
 
 	oaknet_devs = NULL;
 
-	unload_8390_module();
 }
 
 module_init(oaknet_init_module);
diff -ur 2400-t10-p6/linux/drivers/net-old/smc-mca.c 2400-t10-p6/linux/drivers/net/smc-mca.c
--- 2400-t10-p6/linux/drivers/net-old/smc-mca.c	Wed Jun 28 11:38:27 2000
+++ 2400-t10-p6/linux/drivers/net/smc-mca.c	Tue Oct 31 19:14:59 2000
@@ -455,9 +455,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("wd.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_ULTRAMCA_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ultra[this_dev];
 		dev->irq = irq[this_dev];
@@ -468,7 +465,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			printk(KERN_NOTICE "smc-mca.c: No SMC Ultra card found (i/o = 0x%x).\n", io[this_dev]);
 			return -ENXIO;
 		}
@@ -493,7 +489,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/smc-ultra.c 2400-t10-p6/linux/drivers/net/smc-ultra.c
--- 2400-t10-p6/linux/drivers/net-old/smc-ultra.c	Wed Jun 28 11:38:27 2000
+++ 2400-t10-p6/linux/drivers/net/smc-ultra.c	Tue Oct 31 19:12:19 2000
@@ -445,9 +445,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("smc-ultra.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_ULTRA_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ultra[this_dev];
 		dev->irq = irq[this_dev];
@@ -460,7 +457,6 @@
 		if (register_netdev(dev) != 0) {
 			printk(KERN_WARNING "smc-ultra.c: No SMC Ultra card found (i/o = 0x%x).\n", io[this_dev]);
 			if (found != 0) return 0;	/* Got at least one. */
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -484,7 +480,6 @@
 			kfree(dev->priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 
diff -ur 2400-t10-p6/linux/drivers/net-old/smc-ultra32.c 2400-t10-p6/linux/drivers/net/smc-ultra32.c
--- 2400-t10-p6/linux/drivers/net-old/smc-ultra32.c	Wed Jun 28 11:38:27 2000
+++ 2400-t10-p6/linux/drivers/net/smc-ultra32.c	Tue Oct 31 19:11:55 2000
@@ -378,9 +378,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("smc-ultra32.c"))
-		return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_ULTRA32_CARDS; this_dev++) {
 		struct net_device *dev = &dev_ultra[this_dev];
 		dev->init = ultra32_probe;
@@ -388,7 +385,6 @@
 			if (found > 0) { /* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			printk(KERN_WARNING "smc-ultra32.c: No SMC Ultra32 found.\n");
 			return -ENXIO;
 		}
@@ -412,6 +408,5 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
diff -ur 2400-t10-p6/linux/drivers/net-old/stnic.c 2400-t10-p6/linux/drivers/net/stnic.c
--- 2400-t10-p6/linux/drivers/net-old/stnic.c	Fri Aug 11 03:09:40 2000
+++ 2400-t10-p6/linux/drivers/net/stnic.c	Tue Oct 31 19:20:26 2000
@@ -105,9 +105,6 @@
   if (! MACH_SE)
     return -ENODEV;
 
-  if (load_8390_module ("stnic.c"))
-    return -ENOSYS;
-
   /* New style probing API */
   dev = init_etherdev (0, 0);
   stnic_dev = dev;
@@ -313,6 +310,4 @@
 }
 
 module_init(stnic_probe);
-/* No cleanup routine - if there were one, it should do a:
-   unload_8390_module()
-*/
+/* No cleanup routine. */
diff -ur 2400-t10-p6/linux/drivers/net-old/wd.c 2400-t10-p6/linux/drivers/net/wd.c
--- 2400-t10-p6/linux/drivers/net-old/wd.c	Sat Oct 28 14:35:41 2000
+++ 2400-t10-p6/linux/drivers/net/wd.c	Tue Oct 31 19:11:22 2000
@@ -464,9 +464,6 @@
 {
 	int this_dev, found = 0;
 
-	if (load_8390_module("wd.c"))
-                return -ENOSYS;
-
 	for (this_dev = 0; this_dev < MAX_WD_CARDS; this_dev++) {
 		struct net_device *dev = &dev_wd[this_dev];
 		dev->irq = irq[this_dev];
@@ -483,7 +480,6 @@
 			if (found != 0) {	/* Got at least one. */
 				return 0;
 			}
-			unload_8390_module();
 			return -ENXIO;
 		}
 		found++;
@@ -507,7 +503,6 @@
 			kfree(priv);
 		}
 	}
-	unload_8390_module();
 }
 #endif /* MODULE */
 

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux