From: ralph@jupiter.SLAC.Stanford.EDU (Ralph Becker-Szendy) Subject: [Q] Serial ports 0/2 and 1/3 don't work at the same time Date: Mon, 31 May 1993 17:46:02 GMT
Problem in a nutshell: Whenever serial port 0 (a.k.a. ttyS0 or cua0)
is open, port 2 doesn't work and vice versa. Same with ports 1 and 3.
The ports are at addresses 3F8,2F8, 3E8, 2E8, and on IRQ 4, 3, 4, 3.
"Is open" means an application program, such as getty or login or
kermit or X (in the case of the mouse) is using it.
Now the gory detail. Linux 0.99pl9 (pl6 had the same problem), no
funny serial options enabled, no auto-IRQ. Kernel was rebuilt, no
change. Motherboard is a no-name 386-40 with Opti chipset. First two
ports (in MS-LOSS language COM1 and COM2) are on a combination board
(2S, P, G, IDE and FDD), no-name brand, no documentation; they
identify themselves as 16450s at the standard addresses with standard
IRQ 4 and 3. By themselves they work wonderfully. Two more ports were
added, in a "USU" brand 2S,P,G board. That came with a tiny piece of
paper, and is jumpered to serial ports at 3E8 and 2E8, and on IRQ 4
and 3 (the parallel port is at 278, and the game port is disabled).
Here is what is connected: ttyS0=mouse (Logitech), ttyS1 is a cp/m
computer, ttyS2 (actually cua2) a Telebit modem, and ttyS3 a Falco
terminal. All these things are set up so they individually work fine:
I can get to cp/m machine and modem with kermit, X sees the mouse, and
the terminal has a getty running on it and can log in and work.
Symptoms: If port 0 is "idle" (nothing is using it, no getty, no user
logged in, no comm program, X is not up so no mouse activity, just
nothing), then port 2 works perfectly. And vice versa, port 2 idle
means port 0 works. Exactly the same happens with ports 1 and 3. When
one tries to use the two of each pair simultaneously, things go wrong:
Outgoing characters (into the port) seem to still make it, but no
incoming characters arrive (except a random one once in a while). This
even holds if one port is already in use; for example someone logged
in on ttyS3, then opening ttyS1 with kermit will block ttyS3.
I have tried the setserial program to check whether things are ok.
First off, it doesn't compile (CMD_CONFIG and TIOCSERCONFIG are
undeclared), and second, the executable which comes with it can't
autoconfigure the ports (invalid argument). I'll investigate this
later, the ports are correctly detected so setserial shouldn't be
necessary.
The reason I have the four ports at IRQ 4, 3, 4 and 3 is that (a) this
is the MS-LOSS default, (b) the FAQ and the source in serial.c are set
up this way, so I assume it is the correct thing to do. On the other
hand, since the IRQ is exactly what links ports 0/2 and 1/3, this is
somewhat suspect.
Any suggestions? And while we are at it: I now have two parallel ports
(lp1 and lp2), both on IRQ 7. I have verified that they work
individually, but (lacking two printers) I don't know whether they'll
interfere.
Thanks much in advance!
-- Ralph Becker-Szendy RALPH@SLAC.STANFORD.EDU Stanford Linear Accelerator Center RALPH@SLACVM.BITNET M.S. 95, P.O. Box 4349, Stanford, CA 94309 (415)926-2701 My opinion. This is not SLAC, Stanford U, or the US DoE speaking. Just me.