Skip to content

Commit

Permalink
[PATCH] libata: refuse to register IRQless ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Sep 26, 2006
1 parent e8216de commit 02f076a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 02f076a

Please sign in to comment.