Subject: new pc532 scn (serial driver)
To: None <port-pc532@NetBSD.ORG>
From: Phil Budne <budd@cs.bu.edu>
List: port-pc532
Date: 05/22/1996 02:00:13
With my pc532 reset switch working again (a bad scn chip was dragging
down the input to the inverter for /RESET) thanks to Philip Zimmerman,
I went back to work on my scn driver, eliminating the strange behavior
I was seeing with tcsh, and removing some now obsolete ifdefs.
I also merged in the latest changes in -current (under ifdef's I can't
test, since I'm still running 1.1ALPHA). It's available from
alpha.gnu.ai.mit.edu by anonymous ftp in /budne/pc532/scn.shar.gz
Here is the scn.README file;
$Id: scn.README,v 1.10 1996/05/22 05:53:30 phil Exp $
Phil Budne's PC532 SCN driver
scn.c features;
tested on NetBSD 1.1alpha
fewer ifdefs!!
implements modem control:
TIOCM{GET,SET,BIS,BIC} ioctl's
CRTSCTS flow control (in hardware)!!
obeys TIOCxFLAGS ioctls (used by "ttyflags" utility)
honors "flags" passed by config.new;
SCN_SW_{SOFTCAR,CLOCAL,CRTSCTS,MDMBUF}
"sun" style carrier support
no longer requires tweaks to tty.c!!
open on regular minor will sleep until carrier comes up
for use by "getty"
open on minor+128 (/dev/cuaN) will open even if carrier is low,
and locks out "regular" opens
allows one alternate speed which is always available (using C/T)
same speed on all 4 chips; default is 57600 (max rate possible)
Duart rxrdy output lines used for fast input interrupt
using ringbuffer code from LBL SPARC zs driver
Full ansi prototyping
added table entry for 115.2Kbps; not tested (may not work?)
messages;
scnN: ring overflow
ring buffer was overrun; increase SCN_RING_SIZE
or decrease SCN_RING_THRESH.
scnN: fifo overflow
UART fifo was overrun;
Use CRTSCTS flow control
make scnrxintr faster; reduce system load;
make sure a minimum of time spent at splhigh()
Neither overflow message should be output more than once a second
for a channel.
TODO:
tune for operation at high speed!
get rid of more ifdefs!!
"hold" line changes until output drains, like sparc zs driver!
implement/debug/test BREAK interrupts with ring buffer
use DUART counter/timer better;
allow different fixed rate per-chip?
allow dynamicly determined rate for each chip. It
would be easiest to have C/T stay in use by a channel
until it closes (avoid playing games switching use of
C/T on open channels)
use duart init/speed table code from Dave Rand!!
keep channel rx interrupt mask bits in softc (like for hw int mask)??
honor CREAD bit in termios?
implement MDMBUF flow????
make dialout flag private (currenly using TS_DIALOUT in ts_state)
make sure DTR follows RTS if not H/W flow
uniform prefix (scn_?) for members of scn_softc
malloc duart_info at attach time? first open??