Skip to contentSkip to conversation

[2.6.22] libata: fix probe time irq printouts

PATCH Applied Olof Johansson 2 participants 2 messages Jun 3, 2007 – Jun 10, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [2.6.22] libata: fix probe time irq printouts

Most drivers don't seem to fill out the host->irq field, resulting in the wrong (no) irq being reported at probe time. For example, sil24 on my system:

ata1: SATA max UDMA/100 cmd 0xd00008009001f000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0
ata2: SATA max UDMA/100 cmd 0xd000080090021000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0

Since they're allocated and set up in ata_host_activate(), just save them away there.

drivers/ata/libata-core.c +3 -0
index af62514..7491b11 100644
@@ -6438,6 +6438,9 @@ int ata_host_activate(struct ata_host *host, int irq,
 	if (rc)
 		devm_free_irq(host->dev, irq, host);
 
+	/* Used to print device info at probe */
+	host->irq = irq;
+
 	return rc;
 }
 
Applied
#1 lore raw
Quoted 18 lines · Olof Johansson

Most drivers don't seem to fill out the host->irq field, resulting in the wrong (no) irq being reported at probe time. For example, sil24 on my system:

ata1: SATA max UDMA/100 cmd 0xd00008009001f000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0
ata2: SATA max UDMA/100 cmd 0xd000080090021000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0

Since they're allocated and set up in ata_host_activate(), just save them away there.

drivers/ata/libata-core.c +0 -0
index af62514..7491b11 100644

drivers/ata/libata-core.c int ata_host_activate(struct ata_host *host, int irq, · line 6443

Quoted 6 lines
drivers/ata/libata-core.c +3 -0
@@ -6438,6 +6438,9 @@ int ata_host_activate(struct ata_host *host, int irq,
 	if (rc)
 		devm_free_irq(host->dev, irq, host);
 
+	/* Used to print device info at probe */
+	host->irq = irq;
+

applied, thanks for fixing that