lkml.org 
[lkml]   [2001]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] missing pci_enable_device

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);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.027 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site