summaryrefslogtreecommitdiffstats
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 23:22:49 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 23:22:49 +0100
commit80d15a607ae95dd0514ab1ab5ea1058a3a585f2b (patch)
treeb3f19c18865f1a1c2f51d4f092bbead9017f91f3 /drivers/ide/setup-pci.c
parent1b166ae7bb9610cdd3c4c66b960aa04004054e41 (diff)
downloadlinux-80d15a607ae95dd0514ab1ab5ea1058a3a585f2b.tar.bz2
ide: handle IDE_HFLAG[_FORCE]_LEGACY_IRQS in ide_pci_init_{one,two}()
Move handling of IDE_HFLAG[_FORCE]_LEGACY_IRQS from ide_init_port() to ide_pci_init_{one,two}(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r--drivers/ide/setup-pci.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index e85d1ed29c2a..9482288e8610 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -570,6 +570,12 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d,
/* fixup IRQ */
hw[1].irq = hw[0].irq = ret;
+ if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) ||
+ (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) {
+ hw[0].irq = 14;
+ hw[1].irq = 15;
+ }
+
ret = ide_host_register(host, d, hws);
if (ret)
ide_host_free(host);
@@ -620,6 +626,12 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
/* fixup IRQ */
hw[i*2 + 1].irq = hw[i*2].irq = ret;
+
+ if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) ||
+ (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) {
+ hw[i*2].irq = 14;
+ hw[i*2 + 1].irq = 15;
+ }
}
ret = ide_host_register(host, d, hws);