1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 12:48:25 +02:00
openwrt-xburst/target/linux/brcm47xx/patches-2.6.23/410-aec62xx_pci_enable.patch
juhosg 284a2e1864 [brcm47xx] refresh 2.6.23 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12311 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-08-14 18:05:37 +00:00

32 lines
727 B
Diff

--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -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 = {