Serial driver *not* broken since 2.2.x, but may break your apps...

Petr Novak (Petr.Novak@i.cz)
Sat, 26 Jun 1999 00:08:19 +0200


Hello,

referring back to my posting yesterday suggesting that the serial driver
does not read characters properly in non-canonical mode with VMIN=1,
VITME=0, I have found and fixed the problem.

The IOCTL API for TIOCM* has changed since 2.2.x (not counting the 2.1.x
train), as the app can now control the OUT1 and OUT2 bits of the MCR.
For COM1 and COM2, setting OUT2 to 0 stops generating interrupts
properly for incoming characters (don't ask me why, I do not know, it's
just like that). Any app issuing the TIOCMSET call to set/reset the
state of RTS, DTR etc. and not using TIOCMGET call to read the old value
and only changing the bits it knows about is certain to turn off the
OUT1 and OUT2 bits and therefore lead to the situation described
yesterday. Another correct way to handle the MCR would be via the
TIOCMBI{C,S} IOCTL.

Anyone using xntpd or ntp with receivers powered from the serial line
connected to COM1 or COM2 on a PC should change the TIOCMSET IOCTL in
refclock_parse.c to something better than just overwriting the MCR with
a value with OUT2 set to 0.

Good luck!

--
Petr Novak <Petr.Novak@i.cz>
ICZ a.s.   www.i.cz
Zirovnicka 6
CZ-106 00 Praha 10
Ph:  +420 2 7276 0337   **changed 1999-03**
Fax: +420 2 7276 0322	**changed 1999-03**

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/