patch-2.4.0-test2 linux/drivers/net/ne2k-pci.c
Next file: linux/drivers/net/ne3210.c
Previous file: linux/drivers/net/ne2.c
Back to the patch index
Back to the overall index
- Lines: 42
- Date:
Mon Jun 19 13:30:58 2000
- Orig file:
v2.4.0-test1/linux/drivers/net/ne2k-pci.c
- Orig date:
Tue May 23 15:31:35 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/net/ne2k-pci.c linux/drivers/net/ne2k-pci.c
@@ -242,11 +242,6 @@
outb(0xff, ioaddr + EN0_ISR); /* Ack all intr. */
}
- if (load_8390_module("ne2k-pci.c")) {
- printk (KERN_ERR "ne2k-pci: cannot load 8390 module\n");
- goto err_out_free_netdev;
- }
-
/* Read the 16 bytes of station address PROM.
We must first initialize registers, similar to NS8390_init(eifdev, 0).
We can't reliably read the SAPROM address without this.
@@ -565,13 +560,18 @@
{
int rc;
- lock_8390_module();
+ 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)
- unlock_8390_module();
+ unload_8390_module();
return rc;
}
@@ -580,7 +580,7 @@
static void __exit ne2k_pci_cleanup(void)
{
pci_unregister_driver (&ne2k_driver);
- unlock_8390_module();
+ unload_8390_module();
}
module_init(ne2k_pci_init);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)