[patch 1/1] LIBATA: Allow devices without IRQ specified to fall back

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Simtec CATS board is an example of an ALI M5229 that
is not correclty supported by libata as the pdev->irq field
has no valid interrupt set. This is due to the legacy IRQ
check in ata_pci_sff_activate_host() only checking to see 
if the device class is legacy, not that the IRQ has been
setup.

Change ata_pci_sff_activate_host() to try the legacy IRQ
numbers (which works correctly) when the dev->irq has not
been set. The current check for !legacy_mode && dev->irq
does not deal with devices that are not in legacy mode
but do not have mapped interrupts.

Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>

Index: linux-2.6.26-quilt2/drivers/ata/libata-sff.c
===================================================================
--- linux-2.6.26-quilt2.orig/drivers/ata/libata-sff.c	2008-07-23 15:11:36.000000000 +0100
+++ linux-2.6.26-quilt2/drivers/ata/libata-sff.c	2008-07-23 15:11:48.000000000 +0100
@@ -2702,7 +2702,7 @@ int ata_pci_sff_activate_host(struct ata
 
 		ata_port_desc(host->ports[0], "irq %d", pdev->irq);
 		ata_port_desc(host->ports[1], "irq %d", pdev->irq);
-	} else if (legacy_mode) {
+	} else if (legacy_mode || !pdev->irq) {
 		if (!ata_port_is_dummy(host->ports[0])) {
 			rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
 					      irq_handler, IRQF_SHARED,

-- 
--
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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux