[comp.unix.i386] Third serial port

tim@cit-vax.Caltech.Edu (Timothy L. Kay) (12/18/89)

I am having trouble installing a third serial port in my 386 running
ISC Unix/386.  I have the X5 update (new serial driver).  I have the
card set to IO address 3E8 (COM3), IRQ 2, and I have added appropriate
lines to /etc/conf/sdevice.d/asy and remade the kernel.

Unfortunately, I don't seem to be getting any interrupts from that
device.  All output seems to be at about one character per second,
which I would guess means that the driver is timing out.  No input
appears.

Does anybody know if it is possible to use IRQ 2 for a serial port?
Is it possible to share interrupts (can I put two ports on the same
interrupt and have it work)?

Thanks in advance,

Tim

cpcahil@virtech.uucp (Conor P. Cahill) (12/19/89)

In article <12978@cit-vax.Caltech.Edu>, tim@cit-vax.Caltech.Edu (Timothy L. Kay) writes:
> Does anybody know if it is possible to use IRQ 2 for a serial port?
> Is it possible to share interrupts (can I put two ports on the same
> interrupt and have it work)?

You can't use IRQ 2 for anything on any AT bus system.  IRQ 2 is used 
by the second interrupt handler.  Usually IRQ2 on a bus card is mapped
to IRQ 9, so try that or try a different IRQ.


-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

rcd@ico.isc.com (Dick Dunn) (12/20/89)

cpcahil@virtech.uucp (Conor P. Cahill) writes:
> ...tim@cit-vax.Caltech.Edu (Timothy L. Kay) writes:
> > Does anybody know if it is possible to use IRQ 2 for a serial port?
> You can't use IRQ 2 for anything on any AT bus system.  IRQ 2 is used 
> by the second interrupt handler.  Usually IRQ2 on a bus card is mapped
> to IRQ 9, so try that or try a different IRQ.

IRQ2 on a PC corresponds to IRQ9 on the AT bus--which includes the 386 ISA
machines.  By that I mean that the line on the bus which generates an IRQ2
on a PC generates an IRQ9 on an AT (since, because of the reason Cahill
points out, it wouldn't make sense to have an IRQ2 bus line).  So, if you
have a board which is designed to have "IRQ2" as one of its choices,
selecting that will give you an IRQ9 on an AT-bus machine without further
ado.
-- 
Dick Dunn     rcd@ico.isc.com    uucp: {ncar,nbires}!ico!rcd     (303)449-2870
   ...Never offend with style when you can offend with substance.

izen@amelia.nas.nasa.gov (Steven H. Izen) (12/21/89)

In article <1989Dec19.220018.18080@ico.isc.com> rcd@ico.isc.com (Dick Dunn) writes:

>IRQ2 on a PC corresponds to IRQ9 on the AT bus--which includes the 386 ISA
>machines.  By that I mean that the line on the bus which generates an IRQ2
>on a PC generates an IRQ9 on an AT (since, because of the reason Cahill
>points out, it wouldn't make sense to have an IRQ2 bus line).  So, if you
>have a board which is designed to have "IRQ2" as one of its choices,
>selecting that will give you an IRQ9 on an AT-bus machine without further
>ado.

Yes, but if you have a VGA (or EGA) will the vertical retrace interrupt,
which according to TFMs goes on IRQ9, get in the way?

-- 
Steve Izen: {sun,uunet}!cwjcc!skybridge!izen386!steve  / Quote corner:
or steve%izen386.uucp@skybridge.scl.cwru.edu          / 
or izen@cwru.cwru.edu	   /-------------------------/ My second bike is a car.
                           | The problem is that I *was* paying attention.

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (12/22/89)

>I am having trouble installing a third serial port in my 386 running
>ISC Unix/386.  I have the X5 update (new serial driver).  I have the
>card set to IO address 3E8 (COM3), IRQ 2, and I have added appropriate
>lines to /etc/conf/sdevice.d/asy and remade the kernel.
>
>Unfortunately, I don't seem to be getting any interrupts from that
>device.  All output seems to be at about one character per second,
>
>Does anybody know if it is possible to use IRQ 2 for a serial port?

The AT bus generally has many unused interrupt lines.  All you have to do is
run a jumper wire from your serial card to something that has a 16 bit
connector.  Try INT 10 or 15 (you need an AT tech ref manual to show you
what pin).



-- 
Jon Zeeff    	zeeff@b-tech.ann-arbor.mi.us  or b-tech!zeeff

izen@amelia.nas.nasa.gov (Steven H. Izen) (12/22/89)

In article <%??HY=@b-tech.uucp> zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
>>I am having trouble installing a third serial port in my 386 running
>>ISC Unix/386.  I have the X5 update (new serial driver).  I have the
>>card set to IO address 3E8 (COM3), IRQ 2, and I have added appropriate
>>lines to /etc/conf/sdevice.d/asy and remade the kernel.

>>Unfortunately, I don't seem to be getting any interrupts from that
>>device.  All output seems to be at about one character per second,

>>Does anybody know if it is possible to use IRQ 2 for a serial port?

>The AT bus generally has many unused interrupt lines.  All you have to do is
>run a jumper wire from your serial card to something that has a 16 bit
>connector.  Try INT 10 or 15 (you need an AT tech ref manual to show you
>what pin).

Whoa.  I tried that with my second serial port under 386/ix.  I changed 
*everything* that needed to be changed to point to the new interrupt 
including some stuff in the appropriate header files.  It didn't work! The
kernel built o.k. and I saw characters going out to the modem, but incoming
characters were lost, and a message which was something like "stray channel
interrupt" (I forget the exact message) was sent to the console.  Nothing I
tried would work with the 386/ix asy driver.  Admittedly this was 2.0.1, before
i installed the x5 update and 2.0.2.  

My solution: I freed up an an interrupt by doing the interrupt remapping trick
suggested above to my second parallel port.  All that I needed to do was put
the appropriate irq # into the device file and rebuild the kernel.  It works
quite well.  The lp device driver on 386/ix is robust and seems to work quite
well! (as opposed to the infamous asy drivers).  I know the author of the lp
drivers reads the net, and he is to be congratulated for a job well done.
(sorry, I forgot your name, otherwise I'd mention it.)



-- 
Steve Izen: {sun,uunet}!cwjcc!skybridge!izen386!steve  / Quote corner:
or steve%izen386.uucp@skybridge.scl.cwru.edu          / 
or izen@cwru.cwru.edu	   /-------------------------/ My second bike is a car.
                           | The problem is that I *was* paying attention.

dpi@loft386.UUCP (Doug Ingraham) (12/25/89)

In article <1989Dec19.002448.2979@virtech.uucp>, cpcahil@virtech.uucp (Conor P. Cahill) writes:
> In article <12978@cit-vax.Caltech.Edu>, tim@cit-vax.Caltech.Edu (Timothy L. Kay) writes:
> > Does anybody know if it is possible to use IRQ 2 for a serial port?
> > Is it possible to share interrupts (can I put two ports on the same
> > interrupt and have it work)?
> 
> You can't use IRQ 2 for anything on any AT bus system.  IRQ 2 is used 
> by the second interrupt handler.  Usually IRQ2 on a bus card is mapped
> to IRQ 9, so try that or try a different IRQ.

Conner is correct.  But if you don't already know this its still confusing.

On an XT IRQ2 goes to IRQ2.  On an AT the IRQ2 pin on the bus goes to IRQ9.
The real IRQ2 is used to cascade the second interrupt controller chip. So
what you need to do is select IRQ2 on your card but tell Unix to use IRQ9.
Some cards are designed to allow the interrupts to be shared.  In those
cases you should be able to set both cards to interrupt 3, but I don't have
any experience with anyone who has made this work.  Another problem with 
using IRQ2 is that some of the EGA cards on the market think they own IRQ2
and weren't designed to allow sharing.  (The interrupt is for vertical
interval.)  You can cut the trace on the card or put a piece of tape across
it if you want to try using it.  I don't know of any applications that make
use of it.  It is pin B4 on the connector (32 pin).  There are actually
lots of interrupts available if you have a 16 bit card.  10, 11, 12, and
15 are listed as reserved by IBM.  Probably these are used by 16 bit
network boards but since I haven't had any direct experience with them I
can't be certain.  On your normal 8 bit com port you can select IRQ3 or
IRQ4.  If you dont use parallel ports you could also use IRQ5 or IRQ7.

Best Wishes



-- 
Doug Ingraham (SysAdmin)
Lofty Pursuits (Public Access for Rapid City SD USA)
uunet!loft386!dpi