From: Alan Cox Date: Tue, 26 Sep 2006 16:35:32 +0000 (+0100) Subject: [PATCH] libata: refuse to register IRQless ports X-Git-Tag: v2.6.19-rc1~898^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02f076aaa1478a91762de522ecb029efbc279690;p=linux-2.6 [PATCH] libata: refuse to register IRQless ports We don't currently support pure polled operation so when we meet a BIOS which forgot to assign an IRQ to a PCI device it all goes a little pear shaped. Trap this case properly. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 753b0152af..b4abd68503 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5453,6 +5453,11 @@ int ata_device_add(const struct ata_probe_ent *ent) int rc; DPRINTK("ENTER\n"); + + if (ent->irq == 0) { + dev_printk(KERN_ERR, dev, "is not available: No interrupt assigned.\n"); + return 0; + } /* alloc a container for our list of ATA ports (buses) */ host = kzalloc(sizeof(struct ata_host) + (ent->n_ports * sizeof(void *)), GFP_KERNEL);