FAS 2.06 async driver, part 2/2

Uwe Doering gemini at geminix.mbx.sub.org
Sun Mar 25 03:06:12 AEST 1990


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	PATCHLEVEL
#	README
#	config-c1-2
#	config-c1-3
#	config-mux4
#	fas.h
#	i_fas-c1-2
#	i_fas-c1-3
#	i_fas-mux4
#	makefile.ISC
#	makefile.uPort
#	n_fas-c1-2
#	n_fas-c1-3
#	n_fas-mux4
#	s_fas-c1-2
#	s_fas-c1-3
#	s_fas-mux4
#	space-c1-2
#	space-c1-3
#	space-mux4
# This archive created: Sat Mar 24 16:49:39 1990
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'PATCHLEVEL'" '(26 characters)'
if test -f 'PATCHLEVEL'
then
	echo shar: "will not over-write existing file 'PATCHLEVEL'"
else
sed 's/^X//' << \SHAR_EOF > 'PATCHLEVEL'
Xrelease 2.06 patchlevel 0
SHAR_EOF
if test 26 -ne "`wc -c < 'PATCHLEVEL'`"
then
	echo shar: "error transmitting 'PATCHLEVEL'" '(should have been 26 characters)'
fi
fi
echo shar: "extracting 'README'" '(22901 characters)'
if test -f 'README'
then
	echo shar: "will not over-write existing file 'README'"
else
sed 's/^X//' << \SHAR_EOF > 'README'
XREADME file for the FAS Final Async Solution driver
X---------------------------------------------------
X
XWhat is this package:
X
X     This is an alternate async driver for 386 based unix systems that
X     adds several features that are not supported by vendors drivers.
X
X        1.  It supports the NS16550 UART chips in full FIFO mode.
X        2.  It supports modem sharing for input and output.
X            Microport almost supported this feature but none
X            of the other vendors did.
X        3.  It supports hardware flow control.
X
X
X     This driver should work with most of the UNIX SYS V/386 3.X ports
X     currently available. You can have both this and the original
X     vendor driver in the same kernel. Each driver controls its own
X     separate set of serial ports. The only restriction here is that
X     any int vector must not be used by more than one of the drivers.
X     The kernel config program will complain otherwise.
X
X     Note: This driver supports neither VP/ix nor DosMerge virtual
X           serial devices. If you need COM ports for your DOS programs
X           you have to connect the needed devices to ports that are
X           controlled by the original vendor async driver. You won't
X           have the special features of the FAS driver on these ports,
X           though. If you don't need to access serial ports from DOS
X           the vendor driver can be removed from the kernel.
X
X------------------------------------------------------------------------
X     
XA little about what it does:
X
X     This driver supports shared line usage by having two logical
X     devices sharing one physical line.  To those familiar with
X     Microport this is very similar.  For the other readers a
X     brief description follows.  For each line there are two
X     names.  For example for the first line the names are ttyF00
X     (minor device 0) and ttyFM00 (minor device 192).  The ttyF00
X     is used for cu, kermit, and other programs that want to dial
X     out.  It ignores the modem signals and just goes to it.  The
X     ttyFM00 line is strictly for getty.  When getty calls open on
X     ttyFM00 the driver hangs the open until the modem asserts the
X     carrier detect signal and then lets the open complete.  If cu
X     opens ttyF00 while getty is waiting for the open to complete
X     the device is given to cu and the getty open must wait for cu
X     to finish and then will again wait for the carrier.  If cu
X     tries to open the ttyF00 line while getty has ttyFM00 open cu
X     will get an error.  If getty tries to open ttyFM00 while cu has
X     ttyF00 open the getty open will just hang and wait for cu to
X     close the line and then wait for the carrier.  To put it simply
X     you should put up a getty on ttyFM00 with a -t 60 and use ttyF00
X     for cu and uucico.
X
X     The modem devices ttyFMxx is the minor device of ttyFxx plus
X     192.  There are several other possible minor devices for
X     each port.  See the description in `fas.c'.
X
X------------------------------------------------------------------------
X
XA little about what it supports:
X
X     The driver supports and has been tested on many async cards
X     and mux boards.  It supports most combinations of shared
X     interrupts.  The current driver supports NS16450, NS16550 and
X     um82450.  It is also reported to work on the 8250B.  I
X     suspect that it will not work on some of the earlier 8250 and
X     8250A parts, due to various bugs and speed problems in these
X     early parts.  Since these parts have no place in an 386 or other
X     high performance systems I did nothing to try to support them.
X     
X     Take a look at the various samples of space-xxxx for details
X     of how to set up for various devices.
X
X
X     A WORD ABOUT CHARACTER LOSSES
X     -----------------------------
X
X     If you experienced character losses with your vendor async
X     driver at high baud rates you shouldn't blame the vendor for
X     that. The real reason for this problem lies in the ancient port
X     devices used in most 386 systems: The 8250 and the NS16450.
X
X     They have only one receiver character buffer. This implies that
X     the operating system must read a character from this buffer before
X     the next one arrives from the port's shift register. For the old
X     IBM PC with DOS this was sufficient. But for UNIX and with baud
X     rates up to 38400 this is simply a joke.
X
X     UNIX is not a real-time operating system. That means that it's
X     kernel isn't optimized for fast interrupt responses. With the
X     proper hardware this is no problem. But because the vendors have
X     to adapt UNIX to the standard hardware found in 386 systems they
X     also have to cope with the NS16450 ports which are in there simply
X     to be compatible with IBM PCs, XTs and ATs.
X
X     It is impossible to make it work at high baud rates without a
X     major redesign of the AT&T supplied UNIX kernel. But then it
X     wouldn't be UNIX SYSV any more.
X
X     Luckily, there is a pin-to-pin replacement available from
X     National Semiconductors: The NS16550A.
X
X     This device has separate 16 character FIFOs for the receiver and
X     the transmitter. With these FIFOs the interrupt latency of the
X     kernel can be quiet high without losing any characters.
X     Additionally, because with most interrupts many characters are
X     processed at once the system is loaded much less.
X
X     As you see, the necessary hardware is available. Therefor, if you
X     have to blame the UNIX vendor then blame him for not telling you
X     that you should buy some NS16550A and/or for not supplying you
X     with a serial driver that supports these port devices.
X
X     But as you have the FAS driver now and if you use the NS16550A
X     devices you shouldn't have this kind of trouble any more. This is
X     the philosophy behind the driver's name `Final Async Solution'.
X
X     Enjoy!
X
X------------------------------------------------------------------------
X
XWhats in this package:
X
X     README         This file.
X
X     INSTALLATION   A description about how to install the driver
X                    on your system.
X
X     PATCHLEVEL     Just a reference file for future updates.
X                    
X     fas.h          The header file for the driver.
X
X     fas.c          The driver itself.
X
X     space-xxxxx    These are samples of what `space.c' must look
X                    like.  You can either copy one of these to
X                    `space.c' or use it as a template to create your
X                    own `space.c'.
X
X          space-c1-2     For com1 and com2.
X
X          space-c1-3     For com1, com2 and com3.
X
X          space-mux4     For the MU-440 four line mux board.
X
X     config-xxxxx   This is for uPort SYS V/386 only.
X                    Kernel configuaration file.  You should pick the one
X                    that matches your configuration and copy it to `config'.
X
X          config-c1-2    For com1 and com2.
X
X          config-c1-3    For com1, com2 and com3.
X
X          config-mux4    For the MU-440 four line mux board.
X
X     s_fas-xxxxx    This is for ISC 386/ix only.
X                    Kernel configuration file.  You should pick the one
X                    that matches your configuration and copy it to `s_fas'.
X
X          s_fas-c1-2     For com1 and com2.
X
X          s_fas-c1-3     For com1, com2 and com3.
X
X          s_fas-mux4     For the MU-440 four line mux board.
X
X     n_fas-xxxxx    This is for ISC 386/ix only.
X                    Tty device nodes file.  You should pick the one
X                    that matches your configuration and copy it to `n_fas'.
X
X          n_fas-c1-2     For com1 and com2.
X
X          n_fas-c1-3     For com1, com2 and com3.
X
X          n_fas-mux4     For the MU-440 four line mux board.
X
X     i_fas-xxxxx    This is for ISC 386/ix only.
X                    Inittab getty lines file.  You should pick the one
X                    that matches your configuration and copy it to `i_fas'.
X
X          i_fas-c1-2     For com1 and com2.
X
X          i_fas-c1-3     For com1, com2 and com3.
X
X          i_fas-mux4     For the MU-440 four line mux board.
X
X     makefile.uPort A makefile for uPort SYS V/386 systems. This is generic
X                    and should work for all configurations of lines
X                    and interrupts.
X
X     makefile.ISC   A makefile for ISC 386/ix systems.  This is generic
X                    and should work for all configurations of lines
X                    and interrupts.
X
X------------------------------------------------------------------------
X
XWhat you will need to use this package:
X
X     You will need a one of the above mentioned systems with the
X     link kit and the software development package.
X
X------------------------------------------------------------------------
X
X
XRelease History:
X
X     release 1.1a Sat Nov 11, 1989
X
X     This is an unofficial release as I'm not the original author
X     of this async driver.
X
X     Uwe Doering		gemini at geminix.mbx.sub.org
X     Billstedter Pfad 17 B
X     1000 Berlin 20
X     West Germany
X
X     New Features:
X
X          Added a third minor tty device number for every physical
X          port. See description preceding the asyopen function in
X          asy.c. Changed the behavior of ttyxx, too.
X
X          Added output hardware handshake support for DSR. Now you
X          can do handshake with CTS, DSR or both. Input hardware
X          handshake is on if you use at least one of the output
X          handshake signals.
X
X          More flexible support of additional interrupt registers
X          on mux boards. This is fully configurable now.
X
X          Added support for the CREAD flag. If not set, receiver
X          interrupts are still serviced, but the received characters
X          are simply thrown away. This is not as elegant as disabeling
X          the interrupts themselves, but with the already existing
X          driver it was the easiest way, and the most new-bugs-preventing,
X          too.
X
X          Added a lot of comments to the source so that the curious
X          user can understand why and how things are done.
X
X
X     Bug Fixes:
X
X          The hang-up-on-last-close flag (HUPCL) was ignored. DTR
X          was asserted regardless of this flag.
X
X          Made the detection of CTS and DCD more bullet-proof.
X          Especially because between a close and the next open of
X          a line, where interrupts are ignored, the software copys of
X          CTS and DCD must be set up propperly in the asyopen function
X          or the tty line would be blocked under certain circum-
X          stances. For similar reasons, there is also a setup in the
X          asyparam function.
X
X          Rewrote the input character processing function to work
X          according to the TERMIO(7) man page.
X
X          Changed the behavior of BREAK generation to let the
X          transmitter drain before TX is set to low.
X
X          Changed line hangup procedure so that the closing
X          process returns immediately and doesn't sleep during
X          the hangup delay/time. Instead, if an other process tries
X          to open the line while hangup is still in progress, this
X          process will sleep until hangup is competed.
X
X          With DOS Merge, on MicroPort V/386 3.0e the linker was
X          missing the function `init8250'. Reengineered this from
X          a disassembler listing of MicroPort's original driver and
X          modified it to work with the NS16550 16-bit FIFO. This
X          funktion was added simply to be able to link the kernel.
X          DOS Merge's virtual COM ports are still unusable with this
X          release, though. To include this function, add a `-DMERGE'
X          to the CFLAGS line in your makefile.
X
X          Made a lot of other corrections and enhancements in both
X          speed and functionallity. As a result of all my effords
X          I think this driver is slightly faster, more versatile
X          and much more stable than the original release.
X
X     ------------------------------------------------------------
X          
X     release 1.1b Sat Nov 25, 1989
X
X     New Features:
X
X          Changed the minor device number scheme again.
X          There are now two main groups: The unblocked open
X          and the blocked open. Every group has four sub-modes
X          and an additional hardware handshake flag. All this
X          is coded in the higher four bits of the minor device
X          number. Because of this, the maximum of 32 ports was
X          reduced to 16 ports so that the port number fits into
X          the remaining lower four bits of the minor device number.
X          32 dumb ports in a single machine would have been overkill
X          anyway. For more details refer to the comment above the
X          `asyopen' function in the file `asy.c'.
X
X     ------------------------------------------------------------
X          
X     release 2.00 Mon Nov 27, 1989
X
X     As this release differs so much from the original version I got,
X     I now declare this as independant from the original author
X     Jim Murray. This allows me to introduce new release levels
X     without wondering whether they will collide with Jim's releases.
X     Of course many credits to Jim for writing this software in the
X     first place. Without his driver as a base I never would have
X     been able to do such kernel driver development.
X
X     Bug Fixes:
X
X          If there were glitches on the hardware handshake lines
X          and the DCD line a getty on this port would sometimes
X          hang and become an immortal process. I think this was
X          because the output buffer wasn't flushed properly
X          on carrier loss. I hope I fixed this now. We'll see.
X
X     ------------------------------------------------------------
X          
X     release 2.01 Tue Nov 28, 1989
X
X     Did some cleanup in the source code.
X
X     I splitted the driver into two parts: The driver itself and
X     the file `space.c'.
X     `space.c' contains all data structures necessary to configure
X     the driver and is compiled at kernel link time. Therefore if you
X     change your serial card configuration you simply change `space.c'
X     directly in the link kit directory and relink the kernel. No
X     driver recompilation or installation is necessary for this.
X     But note that whenever you use `make install' your setup in
X     the link kit directory is overwritten by the original `space.c'
X     file. Therefore you should copy your new `space.c' back to
X     the source directory when you are finished with the configuration.
X
X     Renamed the package to `FAS Final Async Solution'. The following
X     files have been renamed:
X          asy.c          -> fas.c
X          asy.h          -> fas.h
X          asy_conf-xxxxx -> space-xxxxx
X
X     ISC 386/ix is supported now. There are separate makefiles
X     for uPort and ISC to cope with the differences in link kit
X     installation.
X
X     Bug Fixes:
X
X          `getty' still hung sometimes on a line with hardware
X          handshake. Tried to fix it this time.
X
X     ------------------------------------------------------------
X          
X     release 2.02 Thu Nov 30, 1989
X
X     Abandoned the distinction between space-xxxxx files with
X     and without hardware flow control because this is selected
X     by the minor device number now.
X
X     Bug Fixes:
X
X          Set the high and low water marks for hardware input flow
X          control to higher values than software flow control. This
X          gives precedence to software flow control if both methods
X          are used. These marks are self-adjusting and don't need to
X          be changed if some flavor of UNIX has a different buffer
X          size than the standard 256 characters. Before this change
X          concurrent use of both flow controls could cause trouble
X          with some high-speed modems. This is fixed now.
X
X          A flush read or write buffer request now also clears the
X          receiver or transmitter FIFO, respectively. An ioctl
X          call with a TCSETA* command clears the FIFOs, too.
X
X     ------------------------------------------------------------
X          
X     release 2.03 Fri Dec 01, 1989
X
X     Wrote an installation guide. The driver should be quite
X     easy to install now.
X
X     Added tty node configuration files for ISC.
X
X     Hardware input flow control is bound now to the level of the
X     receiver ring buffer instead of the UNIX input buffer. This
X     has the advantage that buffer size and trigger levels are
X     defined in the driver and therefore can be varied as needed.
X
X     New Features:
X
X          Added a boot time status message that shows the init
X          state of each port. This tells you immediately what
X          ports are found and initted by the driver. Useful to
X          determine hardware configuration problems. Refer to
X          file fas.c (function `asyinit') for a description.
X          Thanks to Kritt Gierlewsen for this proposal.
X
X     ------------------------------------------------------------
X          
X     release 2.04 Thu Dec 07, 1989
X
X     Did some cleanup in the source.
X
X     Removed the FIFO clear from the ioctl function. We don't want
X     to do things there that aren't in the book.
X
X     An ioctl call that switches off the CLOCAL flag will create
X     a SIGHUP signal if the carrier is actually missing at this
X     time.
X
X     Every device is tested now quite thoroughly during initialization.
X     If the test fails the corresponding device keeps unconfigured.
X
X     ------------------------------------------------------------
X          
X     release 2.05 Sat Jan 13, 1990
X
X     This is the first public release of the FAS driver.
X
X     Special thanks to the sysops of my test sites, Axel Fischer and
X     Kritt Gierlewsen.
X
X     FAS is now an independant driver with its own driver name (`fas'),
X     major device number, link kit directory and other things necessary
X     for a driver. The original asy driver may or may not be linked
X     with the kernel. You only need it if you want to access some
X     serial devices via the virtual COM ports of the DOS emulator
X     (DosMerge or VP/ix) because the FAS driver doesn't have this
X     (really vendor dependant) feature.
X
X     The default prefix for tty device node names is `ttyF' now.
X     This prevents mix-ups with the device names of the original
X     asy driver.
X
X     Dropped the SYSV/AT support. I couldn't test the driver
X     for several release generations on uPort SYSV/AT, and because
X     there are not very much systems left with that flavor of UNIX
X     it doesn't make sense to try to maintain compatibility with it.
X     If someone really wants to use this driver on a 286 he has
X     to port it himself.
X
X     Improved the transmitter FIFO fill procedure. Now it will try
X     harder to fill the FIFO as much as possible to cut down on
X     transmitter interrupts.
X
X     Software input flow control (XON/XOFF) is controlled by the driver now.
X     It is bound to the level of the receiver ring buffer (as is hardware
X     flow control). As usual, it can be switched on and off by the
X     IXOFF flag in the termio structure.
X
X     Changed and speeded up the ring buffer -> unix buffer processing.
X
X     For ISC, the getty lines for the inittab file are installed
X     by the makefile now.
X
X     The conditional compilation of the function `init8250' (for
X     DosMerge) is now controlled by a define in `fas.h'. The compiler
X     switch `-DMERGE' is not used any more.
X
X     Improved the documentation.
X
X     The signals used for modem control and hardware flow control are
X     fully configurable in the space.c file now. Look at fas.h for
X     possible macros and combinations.
X
X     There are some new modes for hardware flow control, for instance
X     HO_CTS_ON_DSR. This means that CTS is only looked at if DSR is on.
X     If DSR is off output is possible regardless of CTS. The underlying
X     assumption here is that we can expect proper handshake handling
X     only from devices that are in the ready state (indicated by DSR).
X     As a spin-off the problem with the hanging getty on lines with
X     turned-off terminals (mentioned in earlier releases) should be
X     gone if you use this new mode.
X
X     If the XCLUDE-Flag is availabe (SYSV 3.2 because of Xenix
X     compatibility) exclusive open of a device is possible.
X
X     The default size of the input ring buffer is now 5000 bytes.
X     This makes streaming input more likely even on loaded systems.
X
X     Bug Fixes:
X
X          The task state busy flag wasn't reset in some rare cases.
X          This could cause processes to become immortal while waiting
X          for the busy flag.
X
X          Under some special conditions an ioctl call with a TCSETA?
X          command could corrupt the last character in the transmitter
X          shift register. This is fixed now.
X
X          More fixing of the busy flag handling was necessary.
X          Co-ordinating several delayed tasks controlling this flag
X          is kind of tricky.
X
X          After a TCSETA* ioctl command we disable the transmitter
X          for 2 sec (measured from the last transmitted character)
X          if the character format and/or speed has changed. This
X          gives the receiving side some time to do the same changes.
X          This is kind of experimental. There may be applications that
X          suffer from this delay. You may change the #define ADAPT_TIME
X          in fas.h to a smaller value.
X
X     ------------------------------------------------------------
X          
X     release 2.06 Fri Mar 16, 1990
X
X     This should have been patch #3 for release 2.05, but there are
X     so many changes now that I decided to make it a new release.
X     Therefor some of the changes are described in the 2.05 release
X     notes above but were never released to the public.
X
X     New Features:
X
X          There is a transmitter ring buffer now to make the output
X          less system load dependent. This really speeds things up
X          because the transmitter FIFO gets filled with more characters
X          at once. The buffer size depends on the actual baud rate to
X          prevent long output buffer drains at low speeds.
X
X          There are also bigger input buffers to make FAS more competitive
X          against "intelligent" cards.
X
X          Lots of speed improvements and many small changes.
X
X     Bug Fixes:
X
X          Fixed input/output buffer flush on carrier loss while close
X          is waiting for the output to drain.
X
X---------------------------------------------------------------------
X
XOriginally written by
XJim Murray              encore!cloud9!jjmhome!jjm
X2 Mohawk Circle         harvard!m2c!jjmhome!jjm
XWestboro Mass 01581     jjm%jjmhome at m2c.m2c.org
XUSA                     voice (508) 366-2813
X
XCurrent author:
XUwe Doering		gemini at geminix.mbx.sub.org
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
SHAR_EOF
if test 22901 -ne "`wc -c < 'README'`"
then
	echo shar: "error transmitting 'README'" '(should have been 22901 characters)'
fi
fi
echo shar: "extracting 'config-c1-2'" '(253 characters)'
if test -f 'config-c1-2'
then
	echo shar: "will not over-write existing file 'config-c1-2'"
else
sed 's/^X//' << \SHAR_EOF > 'config-c1-2'
X* its character device number 4
Xcharacter(4)
X
X* its name
Xprefix = fas
X
X* The interrupt vectors handled by this controller
Xintvec = 4,3
X
X* its mask level
Xintpri = SPLTTY
X
X* the functions it supports
Xfunctions = init, open, close, read, write, ioctl, tty
SHAR_EOF
if test 253 -ne "`wc -c < 'config-c1-2'`"
then
	echo shar: "error transmitting 'config-c1-2'" '(should have been 253 characters)'
fi
fi
echo shar: "extracting 'config-c1-3'" '(255 characters)'
if test -f 'config-c1-3'
then
	echo shar: "will not over-write existing file 'config-c1-3'"
else
sed 's/^X//' << \SHAR_EOF > 'config-c1-3'
X* its character device number 4
Xcharacter(4)
X
X* its name
Xprefix = fas
X
X* The interrupt vectors handled by this controller
Xintvec = 4,3,9
X
X* its mask level
Xintpri = SPLTTY
X
X* the functions it supports
Xfunctions = init, open, close, read, write, ioctl, tty
SHAR_EOF
if test 255 -ne "`wc -c < 'config-c1-3'`"
then
	echo shar: "error transmitting 'config-c1-3'" '(should have been 255 characters)'
fi
fi
echo shar: "extracting 'config-mux4'" '(251 characters)'
if test -f 'config-mux4'
then
	echo shar: "will not over-write existing file 'config-mux4'"
else
sed 's/^X//' << \SHAR_EOF > 'config-mux4'
X* its character device number 4
Xcharacter(4)
X
X* its name
Xprefix = fas
X
X* The interrupt vectors handled by this controller
Xintvec = 4
X
X* its mask level
Xintpri = SPLTTY
X
X* the functions it supports
Xfunctions = init, open, close, read, write, ioctl, tty
SHAR_EOF
if test 251 -ne "`wc -c < 'config-mux4'`"
then
	echo shar: "error transmitting 'config-mux4'" '(should have been 251 characters)'
fi
fi
echo shar: "extracting 'fas.h'" '(13651 characters)'
if test -f 'fas.h'
then
	echo shar: "will not over-write existing file 'fas.h'"
else
sed 's/^X//' << \SHAR_EOF > 'fas.h'
X/* This file contains various defines for the FAS async driver.
X   If you change anything here you have to recompile the driver module.
X*/
X
X#ident	"@(#)fas.h	2.06"
X
X#include <sys/param.h>
X#include <sys/types.h>
X#include <sys/signal.h>
X#include <sys/buf.h>
X#include <sys/iobuf.h>
X#include <sys/dir.h>
X#include <sys/user.h>
X#include <sys/errno.h>
X#include <sys/tty.h>
X#include <sys/conf.h>
X#include <sys/sysinfo.h>
X#include <sys/file.h>
X#include <sys/termio.h>
X#include <sys/ioctl.h>
X#include <macros.h>
X
X#if defined (TRUE)
X#undef TRUE
X#endif
X#define	TRUE	(1)
X
X#if defined (FALSE)
X#undef FALSE
X#endif
X#define FALSE	(0)
X
X/* Uncomment the following line if you need init8250. DosMerge needs
X   this function, but only if you link the kernel without the original
X   asy driver.
X*/
X/* #define NEED_INIT8250	/* */
X
X/* Uncomment the following line if you need asyputchar and asygetchar.
X   Bell Tech needs these.  uPort has them burried in the kd device.
X*/
X/* #define NEED_PUT_GETCHAR	/* */
X
X/* Initial line control register.  Value will only be meaningful for
X   asyputchar and asygetchar and they are only meaningful if
X   NEED_PUT_GETCHAR is defined.
X*/
X#define	INITIAL_LINE_CONTROL	LC_WORDLEN_8
X
X/* Initial baud rate.  Value will only be meaningful for
X   asyputchar and asygetchar and they are only meaningful if
X   NEED_PUT_GETCHAR is defined.
X*/
X#define INITIAL_BAUD_RATE	(BAUD_BASE/9600)
X
X/* Initial modem control register.  This should probably not have to
X   be touched.  It is here because some terminals used as the console
X   require one or more of the modem signals set. It is only meaningful
X   for asyputchar and asygetchar and they are only meaningful if
X   NEED_PUT_GETCHAR is defined.
X*/
X#define INITIAL_MDM_CONTROL	0
X
X/****************************************************/
X/* Nothing past this line should have to be changed */
X/****************************************************/
X
X#define NUM_INT_VECTORS	16	/* sixteen vectors possible but only
X				   the first eight are normally used
X				*/
X
X#define MAX_UNITS	16	/* we will only use that many units */
X
X/* Miscellaneous Constants */
X
X#define BAUD_BASE	(1843200 / 16)	/* 115200 bps */
X#define HANGUP_DELAY	((HZ) / 4)	/* 250 msec */
X#define HANGUP_TIME	(HZ)		/* 1 sec */
X#define BREAK_TIME	((HZ) / 4)	/* 250 msec */
X#define ADAPT_TIME	((HZ) * 2)	/* 2 sec */
X#define	RECV_BUFF_SIZE	5000		/* receiver ring buffer size (MAX) */
X#define SW_LOW_WATER	2500	/* 50% MAX	sw flow control */
X#define SW_HIGH_WATER	4000	/* 80% MAX	 trigger levels */
X#define HW_LOW_WATER	4500	/* MAX - 500	hw flow control */
X#define HW_HIGH_WATER	4900	/* MAX - 100	 trigger levels */
X#define XMIT_BUFF_SIZE	2500		/* transmitter ring buffer size */
X
X
X/* Here are the modem control flags for the fas_modem array in space.c.
X   They are arranged in three 8-bit masks which are combined to a 32-bit
X   word. Each of these 32-bit words represents one entry in the fas_modem
X   array.
X
X   The lowest byte is used as a mask to manipulate the modem control
X   register for modem enable. Use the MC_* macros to build the mask.
X
X   The second lowest byte is used to mask signals from the modem status
X   register that will be used as the carrier detect signal. Use the MS_*
X   macros to build the mask and shift them 8 bits to the left. If you use
X   more than one signal, carrier is considered on only when all signals
X   are on.
X
X   The second highes byte is used to mask signals from the modem status
X   register that will be used as the unblock signal. Use the MS_* macros
X   to build the mask and shift them 16 bits to the left. If you use more
X   than one signal, unblock occurs only when all signals are on.
X
X   The highest byte is reserved for future use.
X
X   Here are some useful macros for the space.c file. You may create your
X   own macros if you have some special requirements not met by the
X   predefined ones.
X*/
X
X/* modem enable (chose one) */
X#define EN_RTS			MC_SET_RTS	/* RTS enables modem */
X#define EN_DTR			MC_SET_DTR	/* DTR enables modem */
X#define EN_RTS_AND_DTR		(MC_SET_RTS | MC_SET_DTR)
X
X/* carrier detect signal (chose one) */
X#define CA_DCD			(MS_DCD_PRESENT << 8) /* DCD is carr. detect */
X#define CA_CTS			(MS_CTS_PRESENT << 8) /* CTS is carr. detect */
X#define CA_DSR			(MS_DSR_PRESENT << 8) /* DSR is carr. detect */
X
X/* unblock signal (chose one) */
X#define UB_DCD			(MS_DCD_PRESENT << 16)	/* DCD is unblock */
X#define UB_RING			(MS_RING_PRESENT << 16)	/* RING is unblock */
X
X
X/* Here are the hardware handshake flags for the fas_flow array in space.c.
X   They are arranged in three 8-bit masks which are combined to a 32-bit
X   word. Each of these 32-bit words represents one entry in the fas_flow
X   array.
X
X   The lowest byte is used as a mask to manipulate the modem control
X   register for input flow control. Use the MC_* macros to build the mask.
X
X   The second lowest byte is used to mask signals from the modem status
X   register that will be used for output flow control. Use the MS_* macros
X   to build the mask and shift them 8 bits to the left. If you use more
X   than one signal, output is allowed only when all signals are on.
X
X   The second highest byte is used to mask signals from the modem status
X   register that will be used to enable the output flow control selected
X   by the second lowest byte. Use the MS_* macros to build the mask and
X   shift them 16 bits to the left. If you use more than one signal, output
X   flow control is enabled only when all signals are on.
X
X   The highest byte is reserved for future use.
X
X   Here are some useful macros for the space.c file. You may create your
X   own macros if you have some special requirements not met by the
X   predefined ones.
X*/
X
X/* input flow control (chose one) */
X#define HI_RTS			MC_SET_RTS	/* RTS input flow ctrl */
X#define HI_DTR			MC_SET_DTR	/* DTR input flow ctrl */
X#define HI_RTS_AND_DTR		(MC_SET_RTS | MC_SET_DTR)
X
X/* output flow control (chose one) */
X#define HO_CTS			(MS_CTS_PRESENT << 8) /* CTS output flow ctrl */
X#define HO_DSR			(MS_DSR_PRESENT << 8) /* DSR output flow ctrl */
X#define HO_CTS_AND_DSR		((MS_CTS_PRESENT | MS_DSR_PRESENT) << 8)
X#define HO_CTS_ON_DSR		((MS_CTS_PRESENT << 8) | (MS_DSR_PRESENT << 16))
X#define HO_CTS_ON_DSR_AND_DCD	((MS_CTS_PRESENT << 8) \
X				| ((MS_DSR_PRESENT | MS_DCD_PRESENT) << 16))
X
X
X/* define the local open flags */
X
X#define OS_DEVICE_CLOSED	0x0000
X#define OS_OPEN_FOR_DIALOUT	0x0001
X#define OS_OPEN_FOR_GETTY	0x0002
X#define OS_WAIT_OPEN		0x0004
X#define OS_NO_DIALOUT		0x0008
X#define OS_CHECK_CARR_ON_OPEN	0x0010
X#define OS_FAKE_CARR_ON		0x0020
X#define OS_UNBLOCK_ENABLE	0x0040
X#define OS_CLOCAL		0x0080
X#define OS_HW_HANDSHAKE		0x0100
X#define OS_EXCLUSIVE_OPEN	0x0200	/* SYSV 3.2 Xenix compatibility */
X
X#define OS_OPEN_STATES		(OS_OPEN_FOR_DIALOUT | OS_OPEN_FOR_GETTY)
X#define OS_TEST_MASK		(OS_OPEN_FOR_DIALOUT | OS_NO_DIALOUT \
X				| OS_CHECK_CARR_ON_OPEN | OS_FAKE_CARR_ON \
X				| OS_UNBLOCK_ENABLE | OS_CLOCAL \
X				| OS_HW_HANDSHAKE | OS_EXCLUSIVE_OPEN)
X
X/* define the device status flags */
X
X#define DF_DEVICE_CONFIGURED	0x0001	/* device is configured */
X#define DF_DEVICE_HAS_FIFO	0x0002	/* it's an NS16550 */
X#define DF_DEVICE_OPEN		0x0004	/* physical device is open */
X#define DF_DEVICE_LOCKED	0x0008	/* physical device locked */
X#define DF_MODEM_ENABLED	0x0010	/* modem enabled */
X#define DF_SWO_STOPPED		0x0020	/* output stopped by sw flow control */
X#define DF_SWI_STOPPED		0x0040	/* input stopped by sw flow control */
X#define DF_SW_FC_REQ		0x0080	/* sw input flow control request */
X#define	DF_HWO_STOPPED		0x0100	/* output stopped by hw handshake */
X#define DF_HWI_STOPPED		0x0200	/* input stopped by hw handshake */
X#define DF_XMIT_DISABLED	0x0400	/* transmitter is disabled */
X#define DF_XMIT_BUSY		0x0800	/* transmitter is busy */
X#define DF_DO_HANGUP		0x1000	/* delayed hangup request */
X#define DF_DO_BREAK		0x2000	/* delayed break request */
X#define DF_GUARD_TIMEOUT	0x4000	/* protect last char from corruption */
X#define DF_ADAPT_TIMEOUT	0x8000	/* transmitter was used recently */
X
X/* define an easy way to refenence the absolute port addresses */
X
X#define RCV_DATA_PORT		(fip->uart_port_0)
X#define XMT_DATA_PORT		(fip->uart_port_0)
X#define INT_ENABLE_PORT		(fip->uart_port_1)
X#define INT_ID_PORT		(fip->uart_port_2)
X#define FIFO_CTL_PORT		(fip->uart_port_2)
X#define LINE_CTL_PORT		(fip->uart_port_3)
X#define MDM_CTL_PORT		(fip->uart_port_4)
X#define LINE_STATUS_PORT	(fip->uart_port_5)
X#define MDM_STATUS_PORT		(fip->uart_port_6)
X#define DIVISOR_LSB_PORT	(fip->uart_port_0)
X#define DIVISOR_MSB_PORT	(fip->uart_port_1)
X#define INT_ACK_PORT		(fip->int_ack_port)
X
X/* modem control port */
X
X#define MC_SET_DTR		0x01
X#define MC_SET_RTS		0x02
X#define MC_SET_OUT1		0x04
X#define MC_SET_OUT2		0x08	/* tristates int line when false */
X#define MC_SET_LOOPBACK		0x10
X
X/* modem status port */
X
X#define MS_CTS_PRESENT		0x10
X#define MS_DSR_PRESENT		0x20
X#define MS_RING_PRESENT		0x40
X#define MS_DCD_PRESENT		0x80
X
X#define MS_ANY_PRESENT	(MS_CTS_PRESENT | MS_DSR_PRESENT | MS_RING_PRESENT \
X				| MS_DCD_PRESENT)
X
X/* interrupt enable port */
X
X#define IE_NONE				0x00
X#define	IE_RECV_DATA_AVAILABLE		0x01
X#define	IE_XMIT_HOLDING_BUFFER_EMPTY	0x02
X#define IE_LINE_STATUS			0x04
X#define IE_MODEM_STATUS			0x08
X
X#define IE_INIT_MODE	(IE_RECV_DATA_AVAILABLE | IE_XMIT_HOLDING_BUFFER_EMPTY \
X			| IE_LINE_STATUS | IE_MODEM_STATUS)
X
X/* interrupt id port */
X
X#define II_NO_INTS_PENDING	0x01
X#define II_CODE_MASK		0x07
X#define II_MODEM_STATE		0x00
X#define II_XMTD_CHAR		0x02
X#define II_RCVD_CHAR		0x04
X#define II_RCV_ERROR		0x06
X#define II_FIFO_TIMEOUT		0x08
X#define II_FIFO_ENABLED		0xC0
X
X/* line control port */
X
X#define	LC_WORDLEN_MASK		0x03
X#define	LC_WORDLEN_5		0x00
X#define	LC_WORDLEN_6		0x01
X#define	LC_WORDLEN_7		0x02
X#define	LC_WORDLEN_8		0x03
X#define LC_STOPBITS_LONG	0x04
X#define LC_ENABLE_PARITY	0x08
X#define LC_EVEN_PARITY		0x10
X#define LC_STICK_PARITY		0x20
X#define LC_SET_BREAK_LEVEL	0x40
X#define LC_ENABLE_DIVISOR	0x80
X
X/* line status port */
X
X#define LS_RCV_AVAIL		0x01
X#define LS_OVERRUN		0x02
X#define LS_PARITY_ERROR		0x04
X#define LS_FRAMING_ERROR	0x08
X#define LS_BREAK_DETECTED	0x10
X#define LS_XMIT_AVAIL		0x20
X#define LS_XMIT_COMPLETE	0x40
X#define LS_ERROR_IN_FIFO	0x80	/* NS16550 only */
X 
X#define LS_RCV_INT	(LS_RCV_AVAIL | LS_OVERRUN | LS_PARITY_ERROR \
X			| LS_FRAMING_ERROR | LS_BREAK_DETECTED)
X
X/* fifo control port (NS16550 only) */
X
X#define	FIFO_ENABLE	0x01
X#define	FIFO_CLR_RECV	0x02
X#define	FIFO_CLR_XMIT	0x04
X#define	FIFO_START_DMA	0x08
X#define FIFO_SIZE_1	0x00
X#define FIFO_SIZE_4	0x40
X#define FIFO_SIZE_8	0x80
X#define FIFO_SIZE_14	0xC0
X#define FIFO_SIZE_MASK	0xC0
X
X#define STANDARD_FIFO_CLEAR	0
X#define STANDARD_FIFO_SETUP	(FIFO_SIZE_8 | FIFO_ENABLE)
X#define STANDARD_FIFO_INIT	(STANDARD_FIFO_SETUP | FIFO_CLR_RECV \
X				| FIFO_CLR_XMIT)
X
X#define INPUT_FIFO_SIZE		16
X#define OUTPUT_FIFO_SIZE	16
X
X
X/* This structure contains everything one would like to know about
X   an open device.  There is one of these for each physical unit.
X
X   We use several unions to eliminate most integer type conversions
X   at run-time. The standard UNIX V 3.X/386 C compiler forces all
X   operands in expressions and all function parameters to type int.
X   To save some time, with the means of unions we deliver type int
X   at the proper locations while dealing with the original type
X   wherever int would be slower.
X
X   This is highly compiler implementation specific. But for the sake
X   of speed the end justifies the means.
X*/
X
Xstruct	fas_info
X{
X	struct	tty	*tty;	/* the tty structure */
X	struct	fas_info *prev_int_user;/* link to previous fas_info struct */
X	struct	fas_info *next_int_user;/* link to next fas_info struct */
X	uint	vec;		/* interrupt vector for this struct */
X	uint	iflag;		/* current terminal input flags */
X	uint	cflag;		/* current terminal hardware control flags */
X	union {			/* flags about the device */
X		ushort	s;
X		uint	i;
X	} device_flags;
X	uint	o_state;	/* current open state */
X	uint	po_state;	/* previous open state */
X	union {			/* modem control masks */
X		struct {
X			unchar	en;	/* mask for modem enable */
X			unchar	ca;	/* mask for carrier detect */
X			unchar	ub;	/* mask for unblock signal */
X		} m;
X		uint	i;
X	} modem;
X	union {			/* hardware flow control masks */
X		struct {
X			unchar	ic;	/* control mask for inp. flow ctrl */
X			unchar	oc;	/* control mask for outp. flow ctrl */
X			unchar	oe;	/* enable mask for outp. flow ctrl */
X		} m;
X		uint	i;
X	} flow;
X	uint	msr;		/* modem status register value */
X	union {			/* modem control register value */
X		unchar	c;
X		uint	i;
X	} mcr;
X	union {			/* line control register value */
X		unchar	c;
X		uint	i;
X	} lcr;
X	union {			/* interrupt enable register value */
X		unchar	c;
X		uint	i;
X	} ier;
X	uint	timeout_idx;	/* timeout index for untimeout () */
X	uint	uart_port_0;	/* uart port 0 address */
X	uint	uart_port_1;	/* uart port 1 address */
X	uint	uart_port_2;	/* uart port 2 address */
X	uint	uart_port_3;	/* uart port 3 address */
X	uint	uart_port_4;	/* uart port 4 address */
X	uint	uart_port_5;	/* uart port 5 address */
X	uint	uart_port_6;	/* uart port 6 address */
X	uint	int_ack_port;	/* int ack port address */
X	uint	int_ack;	/* int ack value */
X	uint	recv_ring_cnt;	/* receiver ring buffer counter */
X	unchar	*recv_ring_put_ptr;	/* recv ring buf put ptr */
X	unchar	*recv_ring_take_ptr;	/* recv ring buf take ptr */
X	uint	xmit_ring_size;	/* transmitter ring buffer size */
X	uint	xmit_ring_cnt;	/* transmitter ring buffer counter */
X	unchar	*xmit_ring_put_ptr;	/* xmit ring buf put ptr */
X	unchar	*xmit_ring_take_ptr;	/* xmit ring buf take ptr */
X	unchar	recv_buffer [RECV_BUFF_SIZE];	/* recv ring buf */
X	unchar	xmit_buffer [XMIT_BUFF_SIZE];	/* xmit ring buf */
X};
SHAR_EOF
if test 13651 -ne "`wc -c < 'fas.h'`"
then
	echo shar: "error transmitting 'fas.h'" '(should have been 13651 characters)'
fi
fi
echo shar: "extracting 'i_fas-c1-2'" '(72 characters)'
if test -f 'i_fas-c1-2'
then
	echo shar: "will not over-write existing file 'i_fas-c1-2'"
else
sed 's/^X//' << \SHAR_EOF > 'i_fas-c1-2'
XF0:2345:off:/etc/getty ttyFM00 9600
XF1:2345:off:/etc/getty ttyFM01 9600
SHAR_EOF
if test 72 -ne "`wc -c < 'i_fas-c1-2'`"
then
	echo shar: "error transmitting 'i_fas-c1-2'" '(should have been 72 characters)'
fi
fi
echo shar: "extracting 'i_fas-c1-3'" '(108 characters)'
if test -f 'i_fas-c1-3'
then
	echo shar: "will not over-write existing file 'i_fas-c1-3'"
else
sed 's/^X//' << \SHAR_EOF > 'i_fas-c1-3'
XF0:2345:off:/etc/getty ttyFM00 9600
XF1:2345:off:/etc/getty ttyFM01 9600
XF2:2345:off:/etc/getty ttyFM02 9600
SHAR_EOF
if test 108 -ne "`wc -c < 'i_fas-c1-3'`"
then
	echo shar: "error transmitting 'i_fas-c1-3'" '(should have been 108 characters)'
fi
fi
echo shar: "extracting 'i_fas-mux4'" '(144 characters)'
if test -f 'i_fas-mux4'
then
	echo shar: "will not over-write existing file 'i_fas-mux4'"
else
sed 's/^X//' << \SHAR_EOF > 'i_fas-mux4'
XF0:2345:off:/etc/getty ttyFM00 9600
XF1:2345:off:/etc/getty ttyFM01 9600
XF2:2345:off:/etc/getty ttyFM02 9600
XF3:2345:off:/etc/getty ttyFM03 9600
SHAR_EOF
if test 144 -ne "`wc -c < 'i_fas-mux4'`"
then
	echo shar: "error transmitting 'i_fas-mux4'" '(should have been 144 characters)'
fi
fi
echo shar: "extracting 'makefile.ISC'" '(1280 characters)'
if test -f 'makefile.ISC'
then
	echo shar: "will not over-write existing file 'makefile.ISC'"
else
sed 's/^X//' << \SHAR_EOF > 'makefile.ISC'
X# Makefile for ISC SYS V/386
X
XSHELL=/bin/sh
XINCLSYS=/usr/include/sys
XLKDRVRDIR=/etc/conf/pack.d/fas
XLKSCONFDIR=/etc/conf/sdevice.d
XLKNCONFDIR=/etc/conf/node.d
XLKICONFDIR=/etc/conf/init.d
XDRVRNAME=Driver.o
XCONFNAME=fas
X
XCFLAGS = -O -DINKERNEL
X
XOBJS = fas.o
X
Xfas.o:		fas.c $(INCLSYS)/fas.h
X
Xinstall:	fas.o space.c s_$(CONFNAME) n_$(CONFNAME) i_$(CONFNAME)
X	-mkdir $(LKDRVRDIR) 2> /dev/null
X	chmod 755 $(LKDRVRDIR)
X	cp fas.o $(LKDRVRDIR)/$(DRVRNAME)
X	chmod 644 $(LKDRVRDIR)/$(DRVRNAME)
X	cp space.c $(LKDRVRDIR)/space.c
X	chmod 644 $(LKDRVRDIR)/space.c
X	cp s_$(CONFNAME) $(LKSCONFDIR)/$(CONFNAME)
X	chmod 644 $(LKSCONFDIR)/$(CONFNAME)
X	cp n_$(CONFNAME) $(LKNCONFDIR)/$(CONFNAME)
X	chmod 644 $(LKNCONFDIR)/$(CONFNAME)
X	cp i_$(CONFNAME) $(LKICONFDIR)/$(CONFNAME)
X	chmod 644 $(LKICONFDIR)/$(CONFNAME)
X
Xspace.c:
X	@echo "You must link the proper space-xxxxx file to \`space.c'"
X	@false
X	
Xs_$(CONFNAME):
X	@echo "You must link the proper s_$(CONFNAME)-xxxxx file to \`s_$(CONFNAME)'"
X	@false
X		
Xn_$(CONFNAME):
X	@echo "You must link the proper n_$(CONFNAME)-xxxxx file to \`n_$(CONFNAME)'"
X	@false
X		
Xi_$(CONFNAME):
X	@echo "You must link the proper i_$(CONFNAME)-xxxxx file to \`i_$(CONFNAME)'"
X	@false
X		
X$(INCLSYS)/fas.h:	fas.h
X	cp fas.h $(INCLSYS)/fas.h
X
Xclean:
X	rm -f fas.o
X
Xclobber:	clean
X
SHAR_EOF
if test 1280 -ne "`wc -c < 'makefile.ISC'`"
then
	echo shar: "error transmitting 'makefile.ISC'" '(should have been 1280 characters)'
fi
fi
echo shar: "extracting 'makefile.uPort'" '(828 characters)'
if test -f 'makefile.uPort'
then
	echo shar: "will not over-write existing file 'makefile.uPort'"
else
sed 's/^X//' << \SHAR_EOF > 'makefile.uPort'
X# Makefile for uPort SYS V/386
X
XSHELL=/bin/sh
XINCLSYS=/usr/include/sys
XLKDRVRDIR=/etc/atconf/modules/fas
XLKCONFDIR=/etc/atconf/modules/fas
XDRVRNAME=fas.o
XCONFNAME=config
X
XCFLAGS = -O -DINKERNEL -DOPTIM
X
XOBJS = fas.o
X
Xfas.o:		fas.c $(INCLSYS)/fas.h
X
Xinstall:	fas.o space.c $(CONFNAME)
X	-mkdir $(LKDRVRDIR) 2> /dev/null
X	chmod 755 $(LKDRVRDIR)
X	cp fas.o $(LKDRVRDIR)/$(DRVRNAME)
X	chmod 644 $(LKDRVRDIR)/$(DRVRNAME)
X	cp space.c $(LKDRVRDIR)/space.c
X	chmod 644 $(LKDRVRDIR)/space.c
X	cp $(CONFNAME) $(LKCONFDIR)/$(CONFNAME)
X	chmod 644 $(LKCONFDIR)/$(CONFNAME)
X
Xspace.c:
X	@echo "You must link the proper space-xxxxx file to \`space.c'"
X	@false
X	
X$(CONFNAME):
X	@echo "You must link the proper $(CONFNAME)-xxxxx file to \`$(CONFNAME)'"
X	@false
X		
X$(INCLSYS)/fas.h:	fas.h
X	cp fas.h $(INCLSYS)/fas.h
X
Xclean:
X	rm -f fas.o
X
Xclobber:	clean
X
SHAR_EOF
if test 828 -ne "`wc -c < 'makefile.uPort'`"
then
	echo shar: "error transmitting 'makefile.uPort'" '(should have been 828 characters)'
fi
fi
echo shar: "extracting 'n_fas-c1-2'" '(68 characters)'
if test -f 'n_fas-c1-2'
then
	echo shar: "will not over-write existing file 'n_fas-c1-2'"
else
sed 's/^X//' << \SHAR_EOF > 'n_fas-c1-2'
Xfas	ttyF00	c	48
Xfas	ttyF01	c	49
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
SHAR_EOF
if test 68 -ne "`wc -c < 'n_fas-c1-2'`"
then
	echo shar: "error transmitting 'n_fas-c1-2'" '(should have been 68 characters)'
fi
fi
echo shar: "extracting 'n_fas-c1-3'" '(102 characters)'
if test -f 'n_fas-c1-3'
then
	echo shar: "will not over-write existing file 'n_fas-c1-3'"
else
sed 's/^X//' << \SHAR_EOF > 'n_fas-c1-3'
Xfas	ttyF00	c	48
Xfas	ttyF01	c	49
Xfas	ttyF02	c	50
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
SHAR_EOF
if test 102 -ne "`wc -c < 'n_fas-c1-3'`"
then
	echo shar: "error transmitting 'n_fas-c1-3'" '(should have been 102 characters)'
fi
fi
echo shar: "extracting 'n_fas-mux4'" '(136 characters)'
if test -f 'n_fas-mux4'
then
	echo shar: "will not over-write existing file 'n_fas-mux4'"
else
sed 's/^X//' << \SHAR_EOF > 'n_fas-mux4'
Xfas	ttyF00	c	48
Xfas	ttyF01	c	49
Xfas	ttyF02	c	50
Xfas	ttyF03	c	51
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
Xfas	ttyFM03	c	211
SHAR_EOF
if test 136 -ne "`wc -c < 'n_fas-mux4'`"
then
	echo shar: "error transmitting 'n_fas-mux4'" '(should have been 136 characters)'
fi
fi
echo shar: "extracting 's_fas-c1-2'" '(52 characters)'
if test -f 's_fas-c1-2'
then
	echo shar: "will not over-write existing file 's_fas-c1-2'"
else
sed 's/^X//' << \SHAR_EOF > 's_fas-c1-2'
Xfas	Y	1	7	1	4	3f8	3ff	0	0
Xfas	Y	1	7	1	3	2f8	2ff	0	0
SHAR_EOF
if test 52 -ne "`wc -c < 's_fas-c1-2'`"
then
	echo shar: "error transmitting 's_fas-c1-2'" '(should have been 52 characters)'
fi
fi
echo shar: "extracting 's_fas-c1-3'" '(78 characters)'
if test -f 's_fas-c1-3'
then
	echo shar: "will not over-write existing file 's_fas-c1-3'"
else
sed 's/^X//' << \SHAR_EOF > 's_fas-c1-3'
Xfas	Y	1	7	1	4	3f8	3ff	0	0
Xfas	Y	1	7	1	3	2f8	2ff	0	0
Xfas	Y	1	7	1	9	3e8	3ef	0	0
SHAR_EOF
if test 78 -ne "`wc -c < 's_fas-c1-3'`"
then
	echo shar: "error transmitting 's_fas-c1-3'" '(should have been 78 characters)'
fi
fi
echo shar: "extracting 's_fas-mux4'" '(26 characters)'
if test -f 's_fas-mux4'
then
	echo shar: "will not over-write existing file 's_fas-mux4'"
else
sed 's/^X//' << \SHAR_EOF > 's_fas-mux4'
Xfas	Y	4	7	1	4	2a0	2a7	0	0
SHAR_EOF
if test 26 -ne "`wc -c < 's_fas-mux4'`"
then
	echo shar: "error transmitting 's_fas-mux4'" '(should have been 26 characters)'
fi
fi
echo shar: "extracting 'space-c1-2'" '(4625 characters)'
if test -f 'space-c1-2'
then
	echo shar: "will not over-write existing file 'space-c1-2'"
else
sed 's/^X//' << \SHAR_EOF > 'space-c1-2'
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the standard COM1 and COM2 ports.
X*/
X 
X/* Originally written by
XJim Murray              encore!cloud9!jjmhome!jjm
X2 Mohawk Circle         harvard!m2c!jjmhome!jjm
XWestboro Mass 01581     jjm%jjmhome at m2c.m2c.org
XUSA                     voice (508) 366-2813
X*/
X
X/* Current author:
XUwe Doering		gemini at geminix.mbx.sub.org
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.06"
X
X#include <sys/fas.h>
X
X/* This is the number of devices to be handled by this driver.
X   You may define up to 16 devices.  If this number is changed
X   the arrays below must be filled in accordingly.
X*/
X#define NUM_PHYSICAL_UNITS	2
X
X#if NUM_PHYSICAL_UNITS > MAX_UNITS
X#undef NUM_PHYSICAL_UNITS
X#define NUM_PHYSICAL_UNITS	MAX_UNITS
X#endif
X
X/* let the driver know the number of devices */
Xuint	fas_physical_units = NUM_PHYSICAL_UNITS;
X
X/* array of base port addresses */
Xuint	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x3f8,	0x2f8
X};
X
X/* array of interrupt vectors */
Xuint	fas_vec [NUM_PHYSICAL_UNITS] =
X{
X	0x4,	0x3
X};
X
X/* initial modem control port info
X   This value is ored into the modem control value for each UART.  This is
X   normaly used to force out2 which is used to enable the interrupts of
X   the standard com1 and com2 ports.  Several brands of cards have modes
X   that allow them to work in compatible mode like com1 and com2 or as a
X   mux.  One of these cards is the MU-440 card by DFI.  When this card is
X   used with the common interrupt out2 must not be set or there will be
X   a fight on the bus.
X
X   Note: This is one of the major trouble-spots with mux cards. Check
X         your manual.
X*/
X
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	MC_SET_OUT2,	MC_SET_OUT2
X};
X
X/* array of modem control flags
X   You can choose which signals to use for modem control. See fas.h
X   for possible names and values. Whether or not modem control is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING
X};
X
X/* array of hardware flow control flags
X   You can choose which signals to use for hardware handshake. See fas.h
X   for possible names and values. Whether or not hardware handshake is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR
X};
X
X/* additional configurations for multiplexed interrupt boards
X   If you have a mux board, you may have to acknowledge interrupts
X   by writing to a special register. There may be a separate register
X   for every single port or for every interrupt vector or both.
X   The following arrays contain the special register addresses and
X   the corresponding values that are written to them in response
X   to an interrupt.
X*/
X
X/* array of int ack register addresses
X   These registers are written to every time after all interrupt
X   sources in the corresponding UART have been cleared.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_int_ack_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0
X};
X
X/* array of int ack values
X   These values are written to the corresponding int ack register
X   in response to an interrupt.
X*/
X
Xuint	fas_int_ack [NUM_PHYSICAL_UNITS] =
X{
X	0,	0
X};
X
X/* array of int ack mux register addresses
X   These registers are written to every time after all interrupt
X   sources in all of the UARTs that are tied to the corresponding
X   interrupt vector have been cleared.
X   Enter the addresses on a per vector base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_mux_ack_port [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* array of int ack mux values
X   These values are written to the corresponding int ack mux register
X   in response to an interrupt.
X*/
X
Xuint	fas_mux_ack [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
X   ============================================
X*/
X
X/* array of structures to hold all info for a physical minor device */
Xstruct fas_info	fas_info [NUM_PHYSICAL_UNITS];
X
X/* array of ttys for logical minor devices */
Xstruct tty	fas_tty [NUM_PHYSICAL_UNITS * 2];
X
X/* array of pointers to fas_info structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_info	*fas_info_ptr [NUM_PHYSICAL_UNITS];
X
X/* array of pointers to fas_tty structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct tty	*fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
SHAR_EOF
if test 4625 -ne "`wc -c < 'space-c1-2'`"
then
	echo shar: "error transmitting 'space-c1-2'" '(should have been 4625 characters)'
fi
fi
echo shar: "extracting 'space-c1-3'" '(4732 characters)'
if test -f 'space-c1-3'
then
	echo shar: "will not over-write existing file 'space-c1-3'"
else
sed 's/^X//' << \SHAR_EOF > 'space-c1-3'
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the standard COM1 and COM2 and additional COM3
X   ports.
X*/
X 
X/* Originally written by
XJim Murray              encore!cloud9!jjmhome!jjm
X2 Mohawk Circle         harvard!m2c!jjmhome!jjm
XWestboro Mass 01581     jjm%jjmhome at m2c.m2c.org
XUSA                     voice (508) 366-2813
X*/
X
X/* Current author:
XUwe Doering		gemini at geminix.mbx.sub.org
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.06"
X
X#include <sys/fas.h>
X
X/* This is the number of devices to be handled by this driver.
X   You may define up to 16 devices.  If this number is changed
X   the arrays below must be filled in accordingly.
X*/
X#define NUM_PHYSICAL_UNITS	3
X
X#if NUM_PHYSICAL_UNITS > MAX_UNITS
X#undef NUM_PHYSICAL_UNITS
X#define NUM_PHYSICAL_UNITS	MAX_UNITS
X#endif
X
X/* let the driver know the number of devices */
Xuint	fas_physical_units = NUM_PHYSICAL_UNITS;
X
X/* array of base port addresses */
Xuint	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x3f8,	0x2f8,	0x3e8
X};
X
X/* array of interrupt vectors */
Xuint	fas_vec [NUM_PHYSICAL_UNITS] =
X{
X	0x4,	0x3,	0x9
X};
X
X/* initial modem control port info
X   This value is ored into the modem control value for each UART.  This is
X   normaly used to force out2 which is used to enable the interrupts of
X   the standard com1 and com2 ports.  Several brands of cards have modes
X   that allow them to work in compatible mode like com1 and com2 or as a
X   mux.  One of these cards is the MU-440 card by DFI.  When this card is
X   used with the common interrupt out2 must not be set or there will be
X   a fight on the bus.
X
X   Note: This is one of the major trouble-spots with mux cards. Check
X         your manual.
X*/
X
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	MC_SET_OUT2,	MC_SET_OUT2,	MC_SET_OUT2
X};
X
X/* array of modem control flags
X   You can choose which signals to use for modem control. See fas.h
X   for possible names and values. Whether or not modem control is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING
X};
X
X/* array of hardware flow control flags
X   You can choose which signals to use for hardware handshake. See fas.h
X   for possible names and values. Whether or not hardware handshake is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR
X};
X
X/* additional configurations for multiplexed interrupt boards
X   If you have a mux board, you may have to acknowledge interrupts
X   by writing to a special register. There may be a separate register
X   for every single port or for every interrupt vector or both.
X   The following arrays contain the special register addresses and
X   the corresponding values that are written to them in response
X   to an interrupt.
X*/
X
X/* array of int ack register addresses
X   These registers are written to every time after all interrupt
X   sources in the corresponding UART have been cleared.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_int_ack_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0
X};
X
X/* array of int ack values
X   These values are written to the corresponding int ack register
X   in response to an interrupt.
X*/
X
Xuint	fas_int_ack [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0
X};
X
X/* array of int ack mux register addresses
X   These registers are written to every time after all interrupt
X   sources in all of the UARTs that are tied to the corresponding
X   interrupt vector have been cleared.
X   Enter the addresses on a per vector base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_mux_ack_port [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* array of int ack mux values
X   These values are written to the corresponding int ack mux register
X   in response to an interrupt.
X*/
X
Xuint	fas_mux_ack [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
X   ============================================
X*/
X
X/* array of structures to hold all info for a physical minor device */
Xstruct fas_info	fas_info [NUM_PHYSICAL_UNITS];
X
X/* array of ttys for logical minor devices */
Xstruct tty	fas_tty [NUM_PHYSICAL_UNITS * 2];
X
X/* array of pointers to fas_info structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_info	*fas_info_ptr [NUM_PHYSICAL_UNITS];
X
X/* array of pointers to fas_tty structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct tty	*fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
SHAR_EOF
if test 4732 -ne "`wc -c < 'space-c1-3'`"
then
	echo shar: "error transmitting 'space-c1-3'" '(should have been 4732 characters)'
fi
fi
echo shar: "extracting 'space-mux4'" '(4837 characters)'
if test -f 'space-mux4'
then
	echo shar: "will not over-write existing file 'space-mux4'"
else
sed 's/^X//' << \SHAR_EOF > 'space-mux4'
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the DFI MU440 mux board in expanded mode. This board
X   is reported to be compatible with the AST 4-port card.
X*/
X 
X/* Originally written by
XJim Murray              encore!cloud9!jjmhome!jjm
X2 Mohawk Circle         harvard!m2c!jjmhome!jjm
XWestboro Mass 01581     jjm%jjmhome at m2c.m2c.org
XUSA                     voice (508) 366-2813
X*/
X
X/* Current author:
XUwe Doering		gemini at geminix.mbx.sub.org
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.06"
X
X#include <sys/fas.h>
X
X/* This is the number of devices to be handled by this driver.
X   You may define up to 16 devices.  If this number is changed
X   the arrays below must be filled in accordingly.
X*/
X#define NUM_PHYSICAL_UNITS	4
X
X#if NUM_PHYSICAL_UNITS > MAX_UNITS
X#undef NUM_PHYSICAL_UNITS
X#define NUM_PHYSICAL_UNITS	MAX_UNITS
X#endif
X
X/* let the driver know the number of devices */
Xuint	fas_physical_units = NUM_PHYSICAL_UNITS;
X
X/* array of base port addresses */
Xuint	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x2a0,	0x2a8,	0x2b0,	0x2b8
X};
X
X/* array of interrupt vectors */
Xuint	fas_vec [NUM_PHYSICAL_UNITS] =
X{
X	0x4,	0x4,	0x4,	0x4
X};
X
X/* initial modem control port info
X   This value is ored into the modem control value for each UART.  This is
X   normaly used to force out2 which is used to enable the interrupts of
X   the standard com1 and com2 ports.  Several brands of cards have modes
X   that allow them to work in compatible mode like com1 and com2 or as a
X   mux.  One of these cards is the MU-440 card by DFI.  When this card is
X   used with the common interrupt out2 must not be set or there will be
X   a fight on the bus.
X
X   Note: This is one of the major trouble-spots with mux cards. Check
X         your manual.
X*/
X
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0
X};
X
X/* array of modem control flags
X   You can choose which signals to use for modem control. See fas.h
X   for possible names and values. Whether or not modem control is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING,
X	EN_DTR | CA_DCD | UB_RING
X};
X
X/* array of hardware flow control flags
X   You can choose which signals to use for hardware handshake. See fas.h
X   for possible names and values. Whether or not hardware handshake is
X   used is determined by the minor device number at open time.
X*/
Xuint	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR,
X	HI_RTS | HO_CTS_ON_DSR
X};
X
X/* additional configurations for multiplexed interrupt boards
X   If you have a mux board, you may have to acknowledge interrupts
X   by writing to a special register. There may be a separate register
X   for every single port or for every interrupt vector or both.
X   The following arrays contain the special register addresses and
X   the corresponding values that are written to them in response
X   to an interrupt.
X*/
X
X/* array of int ack register addresses
X   These registers are written to every time after all interrupt
X   sources in the corresponding UART have been cleared.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_int_ack_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0
X};
X
X/* array of int ack values
X   These values are written to the corresponding int ack register
X   in response to an interrupt.
X*/
X
Xuint	fas_int_ack [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0
X};
X
X/* array of int ack mux register addresses
X   These registers are written to every time after all interrupt
X   sources in all of the UARTs that are tied to the corresponding
X   interrupt vector have been cleared.
X   Enter the addresses on a per vector base. An address of zero
X   disables this feature.
X*/
X
Xuint	fas_mux_ack_port [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0x2bf,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* array of int ack mux values
X   These values are written to the corresponding int ack mux register
X   in response to an interrupt.
X*/
X
Xuint	fas_mux_ack [NUM_INT_VECTORS] =
X{
X	0,	0,	0,	0,
X	0x80,	0,	0,	0,
X	0,	0,	0,	0,
X	0,	0,	0,	0
X};
X
X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
X   ============================================
X*/
X
X/* array of structures to hold all info for a physical minor device */
Xstruct fas_info	fas_info [NUM_PHYSICAL_UNITS];
X
X/* array of ttys for logical minor devices */
Xstruct tty	fas_tty [NUM_PHYSICAL_UNITS * 2];
X
X/* array of pointers to fas_info structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_info	*fas_info_ptr [NUM_PHYSICAL_UNITS];
X
X/* array of pointers to fas_tty structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct tty	*fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
SHAR_EOF
if test 4837 -ne "`wc -c < 'space-mux4'`"
then
	echo shar: "error transmitting 'space-mux4'" '(should have been 4837 characters)'
fi
fi
exit 0
#	End of shell archive
-- 
Uwe Doering   |  Domain   : gemini at geminix.mbx.sub.org
Berlin        |---------------------------------------------------------------
West Germany  |  Bangpath : ...!uunet!pyramid!tub!tmpmbx!geminix!gemini



More information about the Comp.unix.i386 mailing list