Re: Linux-2.0.11

Darren Senn (sinster@scintilla.darkwater.com)
Wed, 7 Aug 1996 13:21:43 -0700 (PDT)


Subject: Why ISA IRQ's can't be shared (was: serial ports)
To: linux-kernel@vger.rutgers.edu
Date: Wed, 7 Aug 1996 13:21:42 -0700 (PDT)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 1497

All the physical IRQ lines go to every card on an ISA bus. Those wires
are just chunks of copper. Any card that wants to generate a particular
IRQ (let's say 4) just hooks a logic circuit up to the IRQ wire. When
it doesn't want to signal an interrupt, it _drives_ 0 volts onto the
wire. When it does want to signal an interrupt, it _drives_ +5 volts
onto the wire.

Now let's configure two cards to use the same IRQ. Neither wants to
signal an interrupt right now, so they are both driving 0 volts onto
the wire. No problem. The moment that just _one_ card wants to
signal an interrupt, we have a problem: one card is driving +5 volts
on the wire, the other is driving 0 volts. If either card uses the
wrong driving circuitry, it'll short out and let all the magic smoke
out. If both cards are reasonable good quality, the two drivers will
just fight, and the stronger driver will determine the signal on the
wire. But if the stronger is the card that doesn't want an interrupt,
you've just lost data.

So in short, using two cards with the same IRQ causes, at best, lost
interrupts, and at worst, KABLAMMO!

Now, there is a driving circuit that both satisfies the ISA bus'
signal needs, and allows IRQ sharing on the same wire: big open
emitter (not collector) drivers with a pulldown resistor. Luckily,
these drivers are less expensive than standard drivers, so many
companies use them. BUT, there are still companies that use normal
drivers, so you gotta avoid sharing IRQs anyway.