diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:49 -0400 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:49 -0400 |
| commit | 80d15a607ae95dd0514ab1ab5ea1058a3a585f2b (patch) | |
| tree | b3f19c18865f1a1c2f51d4f092bbead9017f91f3 | |
| parent | 1b166ae7bb9610cdd3c4c66b960aa04004054e41 (diff) | |
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>
| -rw-r--r-- | drivers/ide/ide-probe.c | 4 | ||||
| -rw-r--r-- | drivers/ide/setup-pci.c | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index a51ad2bd62b4..80967307f2bb 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
| @@ -1183,10 +1183,6 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port, | |||
| 1183 | if (d->init_iops) | 1183 | if (d->init_iops) |
| 1184 | d->init_iops(hwif); | 1184 | d->init_iops(hwif); |
| 1185 | 1185 | ||
| 1186 | if ((!hwif->irq && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || | ||
| 1187 | (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) | ||
| 1188 | hwif->irq = port ? 15 : 14; | ||
| 1189 | |||
| 1190 | /* ->host_flags may be set by ->init_iops (or even earlier...) */ | 1186 | /* ->host_flags may be set by ->init_iops (or even earlier...) */ |
| 1191 | hwif->host_flags |= d->host_flags; | 1187 | hwif->host_flags |= d->host_flags; |
| 1192 | hwif->pio_mask = d->pio_mask; | 1188 | hwif->pio_mask = d->pio_mask; |
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, | |||
| 570 | /* fixup IRQ */ | 570 | /* fixup IRQ */ |
| 571 | hw[1].irq = hw[0].irq = ret; | 571 | hw[1].irq = hw[0].irq = ret; |
| 572 | 572 | ||
| 573 | if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || | ||
| 574 | (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) { | ||
| 575 | hw[0].irq = 14; | ||
| 576 | hw[1].irq = 15; | ||
| 577 | } | ||
| 578 | |||
| 573 | ret = ide_host_register(host, d, hws); | 579 | ret = ide_host_register(host, d, hws); |
| 574 | if (ret) | 580 | if (ret) |
| 575 | ide_host_free(host); | 581 | ide_host_free(host); |
| @@ -620,6 +626,12 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2, | |||
| 620 | 626 | ||
| 621 | /* fixup IRQ */ | 627 | /* fixup IRQ */ |
| 622 | hw[i*2 + 1].irq = hw[i*2].irq = ret; | 628 | hw[i*2 + 1].irq = hw[i*2].irq = ret; |
| 629 | |||
| 630 | if ((ret == 0 && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || | ||
| 631 | (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) { | ||
| 632 | hw[i*2].irq = 14; | ||
| 633 | hw[i*2 + 1].irq = 15; | ||
| 634 | } | ||
| 623 | } | 635 | } |
| 624 | 636 | ||
| 625 | ret = ide_host_register(host, d, hws); | 637 | ret = ide_host_register(host, d, hws); |
