patch-2.4.2 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

diff -u --recursive --new-file v2.4.1/linux/drivers/net/ne2k-pci.c linux/drivers/net/ne2k-pci.c
@@ -202,6 +202,10 @@
 	if (fnd_cnt++ == 0)
 		printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2);
 
+	i = pci_enable_device (pdev);
+	if (i)
+		return i;
+
 	ioaddr = pci_resource_start (pdev, 0);
 	irq = pdev->irq;
 
@@ -209,10 +213,6 @@
 		printk (KERN_ERR "ne2k-pci: no I/O resource at PCI BAR #0\n");
 		return -ENODEV;
 	}
-
-	i = pci_enable_device (pdev);
-	if (i)
-		return i;
 
 	if (request_region (ioaddr, NE_IO_EXTENT, "ne2k-pci") == NULL) {
 		printk (KERN_ERR "ne2k-pci: I/O resource 0x%x @ 0x%lx busy\n",

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)