Skip to contentSkip to conversation

libata: refuse to register IRQless ports

PATCH Applied Alan Cox 2 participants 2 messages Sep 26, 2006 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 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.

drivers/ata/libata-core.c +5 -0
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-mm1/drivers/ata/libata-core.c linux-2.6.18-mm1/drivers/ata/libata-core.c
@@ -5460,6 +5460,11 @@
 	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);
Applied
#1 lore raw
Quoted 5 lines · Alan Cox

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.

applied, but please stop adding trailing whitespace