提交 02f076aa 编写于 作者: A Alan Cox 提交者: Jeff Garzik

[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: NAlan Cox <alan@redhat.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 e8216dee
...@@ -5453,6 +5453,11 @@ int ata_device_add(const struct ata_probe_ent *ent) ...@@ -5453,6 +5453,11 @@ int ata_device_add(const struct ata_probe_ent *ent)
int rc; int rc;
DPRINTK("ENTER\n"); 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) */ /* alloc a container for our list of ATA ports (buses) */
host = kzalloc(sizeof(struct ata_host) + host = kzalloc(sizeof(struct ata_host) +
(ent->n_ports * sizeof(void *)), GFP_KERNEL); (ent->n_ports * sizeof(void *)), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册