aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 22:53:12 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 22:53:12 +0200
commit8c2eece50a368c7986bae0b3e52739558dd71b51 (patch)
tree967c174b75819ed960950e0ed19057f7b4118f1d /drivers
parenta742d6cf0b37b1a96a1549b1fda0d6b19e0185c2 (diff)
ide: call ide_pci_setup_ports() before do_ide_setup_pci_device()
* Call ide_pci_setup_ports() before do_ide_setup_pci_device() in ide_setup_pci_device[s](). While at it: * Remove stale FIXMEs. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/setup-pci.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 98c663d62b9..b85de71fdc8 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -534,14 +534,16 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
if (ret < 0)
goto out;
+ ide_pci_setup_ports(dev, d, 0, &hw[0], &hws[0]);
+
ret = do_ide_setup_pci_device(dev, d, 1);
+ if (ret < 0)
+ goto out;
- if (ret >= 0) {
- /* FIXME: silent failure can happen */
- ide_pci_setup_ports(dev, d, ret, &hw[0], &hws[0]);
+ /* fixup IRQ */
+ hw[1].irq = hw[0].irq = ret;
- ret = ide_host_add(d, hws, NULL);
- }
+ ret = ide_host_add(d, hws, NULL);
out:
return ret;
}
@@ -559,6 +561,8 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
if (ret < 0)
goto out;
+ ide_pci_setup_ports(pdev[i], d, 0, &hw[i*2], &hws[i*2]);
+
ret = do_ide_setup_pci_device(pdev[i], d, !i);
/*
@@ -568,8 +572,8 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
if (ret < 0)
goto out;
- /* FIXME: silent failure can happen */
- ide_pci_setup_ports(pdev[i], d, ret, &hw[i*2], &hws[i*2]);
+ /* fixup IRQ */
+ hw[i*2 + 1].irq = hw[i*2].irq = ret;
}
ret = ide_host_add(d, hws, NULL);