Skip to contentSkip to conversation

libata: set IRQF_SHARED for legacy PCI IDE IRQs

PATCH In review Tejun Heo 2 participants 2 messages Nov 17, 2006 – Nov 28, 2006 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: set IRQF_SHARED for legacy PCI IDE IRQs

There are machines out there which share legacy PCI IDE IRQs w/ other devices. libata SFF interrupt/HSM code is ready for shared IRQ and has been setting IRQF_SHARED for devices in native PCI mode. Device in legacy mode is still a PCI device and thus supposedly uses active-low level triggered IRQ.

Machines with such setup should be quite rare and w/o this flag libata is likely to fail loading and render the system unuseable. Also, IDE driver has been setting IRQF_SHARED for devices in legacy mode for a looooong time.

---

Jeff, I couldn't find a generic way to check whether an IRQ is confiured as level or edge. All these legacy mess are pretty much for the BIOS to figure out, so let's just do what IDE has been doing.

Thanks.

 drivers/ata/libata-sff.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-sff.c +1 -0
Index: work/drivers/ata/libata-sff.c
===================================================================
@@ -911,6 +911,7 @@ static struct ata_probe_ent *ata_pci_ini
 		return NULL;
 
 	probe_ent->n_ports = 2;
+	probe_ent->irq_flags = IRQF_SHARED;
 
 	if (port_mask & ATA_PORT_PRIMARY) {
 		probe_ent->irq = ATA_PRIMARY_IRQ;
#1 lore raw
Quoted 11 lines · Tejun Heo

There are machines out there which share legacy PCI IDE IRQs w/ other devices. libata SFF interrupt/HSM code is ready for shared IRQ and has been setting IRQF_SHARED for devices in native PCI mode. Device in legacy mode is still a PCI device and thus supposedly uses active-low level triggered IRQ.

Machines with such setup should be quite rare and w/o this flag libata is likely to fail loading and render the system unuseable. Also, IDE driver has been setting IRQF_SHARED for devices in legacy mode for a looooong time.

Quoted 8 lines

---

Jeff, I couldn't find a generic way to check whether an IRQ is confiured as level or edge. All these legacy mess are pretty much for the BIOS to figure out, so let's just do what IDE has been doing.

Thanks.

ACK

probably appropriate for #upstream-fixes, but IMO it's too late into -rc to apply such a change without wide testing