linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] missing pci_enable_device
@ 2001-03-13  1:49 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2001-03-13  1:49 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List


pcnet32 is still touching resources before enabling.
Patch below should apply to ac19.

regards

Dave.

-- 
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs

diff -urN --exclude-from=/home/davej/.exclude linux/drivers/net/pcnet32.c linux-dj/drivers/net/pcnet32.c
--- linux/drivers/net/pcnet32.c	Fri Mar  9 03:29:08 2001
+++ linux-dj/drivers/net/pcnet32.c	Fri Mar  9 03:41:33 2001
@@ -482,6 +482,12 @@

     printk(KERN_INFO "pcnet32_probe_pci: found device %#08x.%#08x\n", ent->vendor, ent->device);

+    if ((err = pci_enable_device(pdev)) < 0) {
+	printk(KERN_ERR "pcnet32.c: failed to enable device -- err=%d\n", err);
+	return err;
+    }
+    pci_set_master(pdev);
+
     ioaddr = pci_resource_start (pdev, 0);
     printk(KERN_INFO "    ioaddr=%#08lx  resource_flags=%#08lx\n", ioaddr, pci_resource_flags (pdev, 0));
     if (!ioaddr) {
@@ -494,13 +500,6 @@
 	return -ENODEV;
     }

-    if ((err = pci_enable_device(pdev)) < 0) {
-	printk(KERN_ERR "pcnet32.c: failed to enable device -- err=%d\n", err);
-	return err;
-    }
-
-    pci_set_master(pdev);
-
     return pcnet32_probe1(ioaddr, pdev->irq, 1, card_idx, pdev);
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-13  1:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-13  1:49 [PATCH] missing pci_enable_device davej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).