/*
* ISA interrupts can be:
* - level triggered, active low (ELCR = 1)
* - edge triggered, active high (ELCR = 0)
* - edge triggered, active low (magic irq 8)
*/
static int __init default_ISA_trigger(int idx)
{
unsigned int irq = mp_irqs[idx].mpc_dstirq;
if (irq == 8)
return 0;
return ISA_ELCR(irq);
}
static int __init default_ISA_polarity(int idx)
{
unsigned int irq = mp_irqs[idx].mpc_dstirq;
if (irq == 8)
return 1;
return ISA_ELCR(irq);
}
If ECLR flag is set for the interrupt, then it must be set to
level trigger with polarity 0.
On the other hand, the above code sets it to level trigger
polarity 1, witch locks my box at boot time.
Moreover, the following section probably has to be removed,
since it forces interrupt back to edge trigger witch leads
to lost interrupts on heavy load.
static int __init trigger_flag_broken(int idx)
{
int bus = mp_irqs[idx].mpc_srcbus;
int polarity = MPBIOS_polarity(idx);
int trigger = MPBIOS_trigger(idx);
if ( (mp_bus_id_to_type[bus] == MP_BUS_ISA) &&
(polarity == 0) /* active-high */ &&
(trigger == 1) /* level */ )
return 1; /* broken */
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/