[magicbox] refresh kernel patches
[openwrt.git] / target / linux / brcm47xx / patches-2.6.23 / 410-aec62xx_pci_enable.patch
1 Index: linux-2.6.23.17/drivers/ide/pci/aec62xx.c
2 ===================================================================
3 --- linux-2.6.23.17.orig/drivers/ide/pci/aec62xx.c
4 +++ linux-2.6.23.17/drivers/ide/pci/aec62xx.c
5 @@ -248,7 +248,14 @@ static int __devinit init_setup_aec62xx(
6
7 static int __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
8 {
9 - unsigned long dma_base = pci_resource_start(dev, 4);
10 + unsigned long dma_base;
11 + int err;
12 +
13 + err = pci_enable_device(dev);
14 + if (err)
15 + return err;
16 +
17 + dma_base = pci_resource_start(dev, 4);
18
19 if (inb(dma_base + 2) & 0x10) {
20 d->name = (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R) ?
21 @@ -256,7 +263,11 @@ static int __devinit init_setup_aec6x80(
22 d->udma_mask = 0x7f; /* udma0-6 */
23 }
24
25 - return ide_setup_pci_device(dev, d);
26 + err = ide_setup_pci_device(dev, d);
27 + if(err)
28 + pci_disable_device(dev);
29 +
30 + return err;
31 }
32
33 static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
This page took 0.0503 seconds and 5 git commands to generate.