Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=277d72a37431d200727189693b14488368b7c258
Commit:     277d72a37431d200727189693b14488368b7c258
Parent:     b14dabcdb651ddd9f85c69c9042322c139e7da84
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 3 17:22:28 2008 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu Jan 10 16:52:51 2008 -0500

    libata-sff: PCI IRQ handling fix
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-sff.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 48acc09..b7ac80b 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,
        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)
@@ -814,7 +817,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
 
                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) {
                if (!ata_port_is_dummy(host->ports[0])) {
                        rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
                                              pi->port_ops->irq_handler,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to