*BSD News Article 6903


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!eden.CS.Berkeley.EDU!cgd
From: cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou)
Newsgroups: comp.unix.bsd
Subject: finally: new fast serial driver...
Date: 23 Oct 1992 05:13:29 GMT
Organization: Kernel Hackers 'r' Us
Lines: 99
Distribution: world
Message-ID: <1c81lpINNpc2@agate.berkeley.edu>
NNTP-Posting-Host: eden.cs.berkeley.edu

finally, i've had time to wrap it...
my latest serial driver...

here's the readme, and in the following message is the uuencoded package.

sorry it took so long!

enjoy!

Chris Demetriou
cgd@berkeley.edu

=== README BEGINS HERE ===
Spiffy Serial Driver, Yet Again!

This one is based on the patches to the standard serial driver made
by Brad Huntting and John Kohl.  I've added my bidirectional ports
stuff, as well.

This driver does not support multiple ports on the same IRQ;
look for that Real Soon Now.

The out-dialing has been tested extensively, and the bidirectional
aspects have been tested "somewhat" -- therefore this is only a BETA --
use it at your own risk.

This package (including this readme) is also available from
agate.berkeley.edu:pub/386BSD/386bsd-0.1/unofficial/fast-com.tar.Z.

Performance: well, I'm writing this from an xterm sent over a 9600
	baud slip line, with a 8250 UART, and it's working... 8-)
	Better than my other hacks to the driver...

Features:
	performance -- fewer overflows
	proper RTS/CTS flow control handling
	bidirectional ports, like SunOS

what to do:
	move com.c and comreg.h into /sys/i386/isa
	apply the patches in "diffs"
	make a new kernel
	remake and re-install /bin/stty
	compile comsoftcar, and put it wherever you want.

in terms of device names, etc. this is the same as the patchkit-patched
com.c.  that is, devices start at minor number 0.

Device Nodes:

	Name:	maj:	min:	purpose:
	com00	8	0	dialin port 0, or dialin/dialout if "softcar"
	com01	8	1	dialin port 1, or dialin/dialout if "softcar"
	etc...
	ttyd0	8	128	dialout port 0, if -softcar
	ttyd1	8	129	dialout port 1, if -softcar
	etc...

how to use:

defaults to "standard" behavior.
use comsoftcar to turn on dialin/out behavior, as described below.
note that doing "stty clocal" basically means "carrier detected at all times
	on both ports (dialin & dialout)"
have getty run on dialin port, tip out of dialout port.

dialout ports assume carrier exists until a real one is detected,
then CD follows it.  dialout ports block on open until real DCD is
detected.  (if you don't understand, see the Sun "ttysoftcar" and "zs"
manpages)

using comsoftcar:

	comsoftcar <portname>

tells you the status of the port. "softcar" means that the bidirectional
features are disabled, and that the ttyd? ports aren't usable.
"-softcar" means that the bidir ports are enabled.

	comsoftcar <portname> [-]softcar

to enable/disable bidir ports.  You must be root to use it in this manner.

in all cases <portname> is the full path name of the port, and it's
safest to use the dialin port, because that'll always work (i.e.
when bidir ports aren't enabled, you can't open the dialout ports).


i think that's it.

have fun, bugs & comments to cgd@berkeley.edu

Chris
=== README ENDS HERE ===
-- 
Chris G. Demetriou                                    cgd@cs.berkeley.edu

"Sometimes it is better to have twenty million instructions by
        Friday than twenty million instructions per second." -- Wes Clark