Alan Cox wrote: > It is legitimate (although annoying and silly) for a PCI IDE controller > not to be assigned an interrupt and to be polled. The libata-sff code > should therefore not try and request IRQ 0 in this case. > > Signed-off-by: Alan Cox <alan@xxxxxxxxxx> > > diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/drivers/ata/libata-sff.c linux-2.6.24-rc6-mm1/drivers/ata/libata-sff.c > --- linux.vanilla-2.6.24-rc6-mm1/drivers/ata/libata-sff.c 2008-01-02 16:04:19.000000000 +0000 > +++ linux-2.6.24-rc6-mm1/drivers/ata/libata-sff.c 2008-01-02 16:12:39.000000000 +0000 > @@ -808,7 +808,10 @@ > if (rc) > goto err_out; > > - if (!legacy_mode) { > + if (!legacy_mode && pdev->irq) { > + /* We may have no IRQ assigned in which case we can poll. This > + shouldn't happen on a sane system but robustness is cheap > + in this case */ > rc = devm_request_irq(dev, pdev->irq, pi->port_ops->irq_handler, > IRQF_SHARED, DRV_NAME, host); > if (rc) > @@ -816,7 +819,7 @@ > > ata_port_desc(host->ports[0], "irq %d", pdev->irq); > ata_port_desc(host->ports[1], "irq %d", pdev->irq); > - } else { > + } else if (legacy_mode) { I would prefer to put if (pdev->irq) inside if (!legacy_mode) but that's nothing major. Acked-by: Tejun Heo <htejun@xxxxxxxxx> -- tejun - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html