aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-16 03:11:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-16 03:11:30 +0000
commit6874422e54449d9ae5ebbaa13e72c7b23f2376fb (patch)
tree2dda3952ac27e1e8e4ad5a534ceddd92700ee264
parent1a92f058ca4d69bb7953154397a76d99c6889af2 (diff)
downloadupstream-6874422e54449d9ae5ebbaa13e72c7b23f2376fb.tar.gz
upstream-6874422e54449d9ae5ebbaa13e72c7b23f2376fb.tar.bz2
upstream-6874422e54449d9ae5ebbaa13e72c7b23f2376fb.zip
fix wl-700gE ide init (patch by biblbroks, fixes #2686)
SVN-Revision: 9560
-rw-r--r--target/linux/brcm47xx/patches-2.6.23/410-aec62xx_pci_enable.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.23/410-aec62xx_pci_enable.patch b/target/linux/brcm47xx/patches-2.6.23/410-aec62xx_pci_enable.patch
new file mode 100644
index 0000000000..ae2be766f9
--- /dev/null
+++ b/target/linux/brcm47xx/patches-2.6.23/410-aec62xx_pci_enable.patch
@@ -0,0 +1,32 @@
+diff -Naur a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
+--- a/drivers/ide/pci/aec62xx.c 2007-10-12 18:43:44.000000000 +0200
++++ b/drivers/ide/pci/aec62xx.c 2007-11-14 14:12:51.000000000 +0100
+@@ -248,7 +248,14 @@
+
+ static int __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
+ {
+- unsigned long dma_base = pci_resource_start(dev, 4);
++ unsigned long dma_base;
++ int err;
++
++ err = pci_enable_device(dev);
++ if (err)
++ return err;
++
++ dma_base = pci_resource_start(dev, 4);
+
+ if (inb(dma_base + 2) & 0x10) {
+ d->name = (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R) ?
+@@ -256,7 +263,11 @@
+ d->udma_mask = 0x7f; /* udma0-6 */
+ }
+
+- return ide_setup_pci_device(dev, d);
++ err = ide_setup_pci_device(dev, d);
++ if(err)
++ pci_disable_device(dev);
++
++ return err;
+ }
+
+ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {