*BSD News Article 10817


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA753 ; Sun, 07 Feb 93 08:01:09 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!sdd.hp.com!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!stanley.cis.Brown.EDU!tim
From: tim@stanley.cis.Brown.EDU (Timothy Miller)
Newsgroups: comp.unix.bsd
Subject: [386BSD?] Why do keystrokes bring IRQ12 line low?
Date: 4 Feb 1993 22:44:27 GMT
Organization: Brown University
Lines: 39
Distribution: world
Message-ID: <1ks68b$s6@cat.cis.Brown.EDU>
NNTP-Posting-Host: stanley.cis.brown.edu

This is a continuation of my earlier troubles with getting my tape drive to
interrupt on IRQ12. I have an IBM Streaming Tape Drive and Adapter, taken from
an RT. This listens on IO ports 1e8-1ef and 6f4, and uses IRQ12. As far as I
can determine, the card works fine, except that my interrupt routine never gets
called (I believe it works fine otherwise because it does if I repeatedly call
my interrupt rtn, pretending an interrupt has occurred). Now, having taken the
machine apart (somewhat) and debugged it with my multimeter, I have discovered
the following: Initially, IRQ12 is low, other IRQ lines used by something are
low, and unused IRQs are high. After initiating a command, IRQ12 never changes.
However, if I then manually trigger it (by shorting it to +5volts), it goes
high and stays high throughout the operation, until the end when it would
normally interrupt, at which point it fluctuates (interrupting correctly),
settling on high after the end. It will remain high indefinitely provided
nothing else happens. However, if I hit a key, IRQ12 suddenly drops to low and
stays there. If I hit a key in the middle of the tape operation, IRQ12 will
also drop low, and the tape adapter will stop sending interrupts. I can't find
any io address or IRQ conflicts between the adapter and anything else
(including in particular the keyboard driver code). Examining the RT tech ref,
I discover that the RT does in fact use the same ISA bus, but that some IRQs
are "shared" and others are "unshared". Unshared IRQs behave the same as on
the AT: they are normally low, become high to signal an interrupt, and are
brought low by the card when the cpu tells the card to do so. Shared IRQs, on
the other hand, are normally high, and are pulsed low by a card to indicate
an interrupt. The RT uses 8259s just like the AT, in edge-triggered mode, and
so the end of the pulse triggers the interrupt. As it turns out, my tape card
uses shared interrupts, and the ethernet card I got to work earlier uses
unshared interrupts, which accounts for the difference. Now the problem I have
is that I have no idea why *keystrokes* would do anything to change the IRQ12
level. My guess might be that the EOI might cause the 8259 to send an outgoing
level on its incoming lines for some strange reason, but the RT uses the same
8259s in the same mode, so I don't see why it wouldn't happen there too.
Furthermore, the RT 4 port serial adapter *also* uses shared IRQs, yet people
have posted patches to the com driver to use them which are claimed to work.
Does anyone have any idea what's going on? Unfortunately I don't have doc on
the 8259 to refer to, and I can't find anything in the IBM AT tech ref that
might relate to this. My system is a Gateway 2000 486DX33 VLB with 8M ram,
a 340M hd, an ATI graphics ultra pro VLB card, the anykey 124 key keyboard,
and nothing else nonstandard. Help!
   Tim