IRQs on old PCs for Version 2.1.42

Richard B. Johnson (
Mon, 9 Jun 1997 08:29:59 -0400 (EDT)

The following patch will allow an old 386SX/16 to work. It has been tested
on that machine, plus two 486-DX/66s plus a 166 MHz Pentium, plus my
dual Pentium 166 Mhz SMP machine.

It is a simple patch that will provide a specific EOI ack to the first
interrupt controller when it handles the cascade interrupt. It is not easy
to test because most machines will seem to work okay. If you have a Network
Card on IRQ<8 plus a Disc Controller on IRQ>8, you are a candidate for
testing, just ftp a large file with the patched kernel. If your keyboard
still works after the transfer, the patch works.

This is a frightening change that could affect a lot of machines if it
ever gets into the kernel distribution. Therefore, it should be tested
on as many different machines as possible. It does allow an old AST-386SX/16
to work properly so it might help other older machines also.

--- /usr/src/linux/arch/i386/kernel/irq.c.orig Mon Jun 9 07:57:15 1997
+++ /usr/src/linux/arch/i386/kernel/irq.c Mon Jun 9 08:02:14 1997
@@ -82,12 +82,13 @@
if (irq_nr & 8) {
inb(0xA1); /* DUMMY */
+ outb(0x62,0x20); /* Specific EOI to cascade */
} else {
inb(0x21); /* DUMMY */
+ outb(0x20,0x20);
- outb(0x20,0x20);

Richard B. Johnson
Analogic Corporation
Email :,
Penguin : Linux version 2.1.42 on an i586 machine (66.15 BogoMips).
Warning : It's hard to stay on the trailing edge of technology.