diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-26 17:35:32 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-26 13:34:26 -0400 |
commit | 02f076aaa1478a91762de522ecb029efbc279690 (patch) | |
tree | 486c3f2b08fceda0fe7f35c2f57cc93c08e779cf /drivers/ata | |
parent | e8216dee838c09776680a6f1a2e54d81f3cdfa14 (diff) |
[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 <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 753b0152afd..b4abd685036 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); |