aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 48acc09dab96..b7ac80b4b1fb 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -806,7 +806,10 @@ int ata_pci_init_one(struct pci_dev *pdev,
806 if (rc) 806 if (rc)
807 goto err_out; 807 goto err_out;
808 808
809 if (!legacy_mode) { 809 if (!legacy_mode && pdev->irq) {
810 /* We may have no IRQ assigned in which case we can poll. This
811 shouldn't happen on a sane system but robustness is cheap
812 in this case */
810 rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler, 813 rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler,
811 IRQF_SHARED, DRV_NAME, host); 814 IRQF_SHARED, DRV_NAME, host);
812 if (rc) 815 if (rc)
@@ -814,7 +817,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
814 817
815 ata_port_desc(host->ports[0], "irq %d", pdev->irq); 818 ata_port_desc(host->ports[0], "irq %d", pdev->irq);
816 ata_port_desc(host->ports[1], "irq %d", pdev->irq); 819 ata_port_desc(host->ports[1], "irq %d", pdev->irq);
817 } else { 820 } else if (legacy_mode) {
818 if (!ata_port_is_dummy(host->ports[0])) { 821 if (!ata_port_is_dummy(host->ports[0])) {
819 rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev), 822 rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
820 pi->port_ops->irq_handler, 823 pi->port_ops->irq_handler,