summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-01-18 20:27:24 +0000
committerjhb <jhb@FreeBSD.org>2005-01-18 20:27:24 +0000
commiteb5749cdd67e5351e0f448d71849036ef8ccf34a (patch)
tree9b4c293773dd31cd6f49920947cd23c4a211bb86
parent5a3bc2892ea0f6b77fd8dfd236132abbac0d7455 (diff)
downloadFreeBSD-src-eb5749cdd67e5351e0f448d71849036ef8ccf34a.zip
FreeBSD-src-eb5749cdd67e5351e0f448d71849036ef8ccf34a.tar.gz
If a valid ELCR was found, consult it for the trigger mode of ISA
interrupts that have a trigger mode of conforming. This fixes problems on some older machines that still route PCI devices via ISA interrupts when using an I/O APIC. Tested by: Peter Trifonov pvtrifonov at mail dot ru MFC after: 1 month
-rw-r--r--sys/i386/i386/io_apic.c2
-rw-r--r--sys/i386/i386/mptable.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/i386/i386/io_apic.c b/sys/i386/i386/io_apic.c
index aca7d78..18923e2 100644
--- a/sys/i386/i386/io_apic.c
+++ b/sys/i386/i386/io_apic.c
@@ -423,7 +423,7 @@ ioapic_config_intr(struct intsrc *isrc, enum intr_trigger trig,
* them to be set to active low.
*
* XXX: Should we write to the ELCR if the trigger mode changes for
- * an EISA IRQ?
+ * an EISA IRQ or an ISA IRQ with the ELCR present?
*/
if (intpin->io_bus == APIC_BUS_EISA)
pol = INTR_POLARITY_HIGH;
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 2026702..d2b0c2c 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -580,12 +580,18 @@ conforming_trigger(u_char src_bus, u_char src_bus_irq)
KASSERT(src_bus <= mptable_maxbusid, ("bus id %d too large", src_bus));
switch (busses[src_bus].bus_type) {
case ISA:
- return (INTR_TRIGGER_EDGE);
+#ifndef PC98
+ if (elcr_found)
+ return (elcr_read_trigger(src_bus_irq));
+ else
+#endif
+ return (INTR_TRIGGER_EDGE);
case PCI:
return (INTR_TRIGGER_LEVEL);
#ifndef PC98
case EISA:
KASSERT(src_bus_irq < 16, ("Invalid EISA IRQ %d", src_bus_irq));
+ KASSERT(elcr_found, ("Missing ELCR"));
return (elcr_read_trigger(src_bus_irq));
#endif
default:
OpenPOWER on IntegriCloud