diff options
-rw-r--r-- | drivers/ide/setup-pci.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index fa645fc41b86..79e3244691ec 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -568,13 +568,11 @@ int ide_pci_init_one(struct pci_dev *dev, const struct ide_port_info *d, | |||
568 | goto out; | 568 | goto out; |
569 | 569 | ||
570 | /* fixup IRQ */ | 570 | /* fixup IRQ */ |
571 | hw[1].irq = hw[0].irq = ret; | 571 | if (ide_pci_is_in_compatibility_mode(dev)) { |
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 = pci_get_legacy_ide_irq(dev, 0); | 572 | hw[0].irq = pci_get_legacy_ide_irq(dev, 0); |
576 | hw[1].irq = pci_get_legacy_ide_irq(dev, 1); | 573 | hw[1].irq = pci_get_legacy_ide_irq(dev, 1); |
577 | } | 574 | } else |
575 | hw[1].irq = hw[0].irq = ret; | ||
578 | 576 | ||
579 | ret = ide_host_register(host, d, hws); | 577 | ret = ide_host_register(host, d, hws); |
580 | if (ret) | 578 | if (ret) |
@@ -625,13 +623,11 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2, | |||
625 | goto out; | 623 | goto out; |
626 | 624 | ||
627 | /* fixup IRQ */ | 625 | /* fixup IRQ */ |
628 | hw[i*2 + 1].irq = hw[i*2].irq = ret; | 626 | if (ide_pci_is_in_compatibility_mode(pdev[i])) { |
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 = pci_get_legacy_ide_irq(pdev[i], 0); | 627 | hw[i*2].irq = pci_get_legacy_ide_irq(pdev[i], 0); |
633 | hw[i*2 + 1].irq = pci_get_legacy_ide_irq(pdev[i], 1); | 628 | hw[i*2 + 1].irq = pci_get_legacy_ide_irq(pdev[i], 1); |
634 | } | 629 | } else |
630 | hw[i*2 + 1].irq = hw[i*2].irq = ret; | ||
635 | } | 631 | } |
636 | 632 | ||
637 | ret = ide_host_register(host, d, hws); | 633 | ret = ide_host_register(host, d, hws); |