FAS 2.05 async driver, part 1/2

Uwe Doering gemini at geminix.UUCP
Mon Jan 15 08:00:15 AEST 1990


Hi netlanders!

Here it is: The public domain async driver FAS 2.05 (mentioned a few
times in comp.unix.i386).

This driver was tested under ISC 386/ix 2.0.2 and MicroPort SYSV/386
Vers. 3.0e and has the following features:

-  It supports the NS16550 UART chip in FIFO mode.
-  Modem sharing for dial-in and dial-out on the same port is possible.
-  It has hardware flow control.

>From the many postings during the last months about problems with the
vendors standard serial drivers I conclude that there is a need for a
full-featured driver that really works.

You really should buy some NS16550A chips as replacements for the 8250
or NS16450 devices on your serial card. They are the key to highspeed
serial ports without losing characters. And they are much less expensive
than an "intelligent" serial card.

To the sites that have some earlier test-releases of FAS in use:
As this is the first official release all previous releases are void.
The first release I will support is 2.05. Therefor, please upgrade!

Note: I won't email you any sources or patches because international
mailing costs are prohibitive in West Germany. But of course I will
post patches.

     Uwe


#! /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:
#	INSTALLATION
#	PATCHLEVEL
#	README
#	config-c1-2
#	config-c1-3
#	config-mux4
#	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: Sun Jan 14 21:46:07 1990
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'INSTALLATION'" '(7535 characters)'
if test -f 'INSTALLATION'
then
	echo shar: "will not over-write existing file 'INSTALLATION'"
else
sed 's/^X//' << \SHAR_EOF > 'INSTALLATION'
XInstallation guide for the FAS Final Async Solution driver
X----------------------------------------------------------
X
XTo install this driver you need a manual of your serial card,
Xyour system manuals and a certain knowledge about what actually
Xis a serial driver.
X
XYou have to be user root to compile and install the driver!
X
X
XCompilation phase
X=================
X
XFirst of all you should copy the makefile that matches your system
Xto the file `makefile'. Make sure that the makefile contains the
Xproper compiler switches for your system. You may also look at
X`fas.c' to find out what defines are possible for conditional
Xcompilation. You should also check the paths and file names used
Xin the makefile.
X
XAfter that you chose one of the space-xxxxx configuration files
Xthat matches your serial card and copy this to `space.c'. If you
Xdon't find a matching space file you should copy the one that
Xcomes closest to your card to `space.c'.
X
XIn any case you should check the entries in that file against your
Xcard's manual and jumper settings. The space files contain explanations
Xabout what data you have to enter.
X
XIf your `space.c' is filled in properly you simply type `make' to
Xcompile the driver. If you don't get error messages you may begin
Xwith the actual installation. Otherwise you have to find the cause of
Xthe trouble. Some error reasons may be missing include files, macros
Xthat are defined in different include files or missing at all, you
Xuse an ANSI compiler that complains about non-ANSI constructions.
XIn the latter case you need to convince the compiler somehow to
Xwork in non-ANSI (standard C) mode.
X
X
XInstallation phase
X==================
X
XIf you want to have both the original asy and the new FAS driver in
Xthe kernel the only restriction is that ports and interrupt vectors
Xcan't be shared between the two drivers. Each driver controls its own
Xseparate set of ports and IRQs.
X
XuPort: Copy one of the config-xxxxx files to `config'. Check out
X       whether the interrupt vectors in this file reflect the
X       jumper settings on your serial card. Note that an IRQ2 on
X       your card is an interrupt vector of 9. All other IRQ numbers
X       correspond to the vector number, though.
X
X       Next you have to tell the config program to include the new
X       driver at kernel link time. This is done by a line in the file
X       /etc/atconf/systems/system.std. Look for the line containing
X       `asy' followed by an asterisk (`*') and a comment. Create a
X       similar line where `asy' is substituted with `fas'. Add a
X       proper comment. If you don't want to use any ports under the
X       DOS emulator you should insert an asterisk at the beginning
X       of the line that contains the word `asy'. This excludes the
X       asy driver from the kernel. But if you want to have it in the
X       kernel you have to configure it to only use the ports you
X       need under DOS. The remaining ports should be controlled by
X       the FAS driver.
X
X       Now type `make install' and after that you are ready to link
X       a new kernel. Refer to your system manuals on how to do that.
X
X       Before you reboot the new kernel make sure that you create
X       the proper tty device nodes in /dev. But first you should
X       remove all device nodes belonging to the original asy driver
X       that you don't need any more.
X
X       Now create your own tty device nodes that fit your needs.
X       The default device name prefix for the FAS driver is `ttyF'.
X       That is, ttyF00, ttyF01 ... and ttyFM00, ttyFM01 ...
X       You may chose another prefix, but note that some utilities
X       like uustat depend on tty-devices beginning with `tty'!
X
X       The default value for the major device number is 4, and
X       sane values for the minor device numbers are 48 + device #
X       for the dialout node and 208 + device # for the dialin (getty)
X       node. Device # counts from 0 and reflects the actual port number.
X       Refer to fas.c (function `fasopen') for a description of the
X       possible minor device numbers.
X
X       Remember to change the inittab file to the new device names.
X       Other files that contain tty-names for some reason should be
X       updated, too (ttytype, Devices etc.).
X
X       After you have booted the new kernel, provided your configuration
X       was correct, you should be able to use the serial devices.
X
X
XISC:   Copy one of the s_fas-xxxxx files to `s_fas'. Make sure
X       that you have a separate line in it for each block of contiguous
X       port addresses assigned to the same interrupt vector (check
X       the jumper settings on your serial card). Each line contains
X       the number of ports bound to that interrupt, the start and
X       end address of the first (lowest or only) port on this interrupt
X       line and other data. Refer to your ISC manuals if you need to
X       change this file. Note that an IRQ2 on your card is an interrupt
X       vector of 9. All other IRQ numbers correspond to the vector
X       number, though.
X
X       Then you copy one of the n_fas-xxxxx files to `n_fas'. This
X       file contains data needed to automatically create tty device
X       nodes at installation time. Things you may want to change are
X       the tty node name and the minor device number (last field) for
X       that node. Make sure you have a node for every port on your
X       serial card in this file.
X
X       Sane values for the minor device numbers are 48 + device #
X       for the dialout node and 208 + device # for the dialin (getty)
X       node. Device # counts from 0 and reflects the actual port number.
X       Refer to fas.c (function `fasopen') for a description of the
X       possible minor device numbers.
X
X       Now copy one of the i_fas-xxxxx files to `i_fas'. This file
X       contains the getty lines for the inittab file which is rebuild
X       every time a new kernel is installed. Make sure that you use the
X       same device names here as in the file `n_fas'.
X
X       Next you have to modify the configuration files for your original
X       asy driver to create only those devices you need for the DOS
X       emulator. Make sure that the asy driver only controls ports and
X       interrupt vectors not used by the FAS driver. If you don't need
X       the asy driver at all you can exclude it from the kernel.
X
X       To tell the kernel config program how to link in the FAS driver
X       you have to add the following line to the file /etc/conf/cf.d/mdevice:
X
X       fas	Iocrwi	iHct	fas	0	4	1	16	-1
X
X       The 6th field contains the major device number of the driver. You
X       may change this if it collides with another driver.
X
X       All this is in the ISC manuals. Read them carefully.
X
X       Now type `make install' and after that you are ready to link
X       a new kernel. Refer to your system manuals on how to do that.
X
X       You may have to change files that contain tty-names for some
X       reason to the new device names (ttytype, Devices etc.). Take
X       the names from `n_fas'.
X
X       After you have booted the new kernel, provided your configuration
X       was correct, you should be able to use the serial devices.
X
X
XOther flavors of UNIX
X=====================
X
XCheck out if one of the above installation schemes is similar to the
Xone you need for your system. Make the appropriate changes and try
Xout if it works. If your system is entirely different you have to
Xfind out from your manuals how to install device drivers. But if
Xyou use a UNIX SYSV/386 3.X you should get it to work eventually.
X
XGood luck.
SHAR_EOF
if test 7535 -ne "`wc -c < 'INSTALLATION'`"
then
	echo shar: "error transmitting 'INSTALLATION'" '(should have been 7535 characters)'
fi
fi
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.05 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'" '(20046 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 DCD
X     and then lets the open complete.  If cu opens ttyF00 while
X     getty is waiting for the open to complete the device is
X     given to cu and the getty open must wait for cu to finish
X     and then will again wait for DCD.  If cu tries to open the
X     ttyF00 line while getty has ttyFM00 open cu will get an error.
X     If getty tries to open ttyFM00 while cu has ttyF00 open the
X     getty open will just hang and wait for cu to close the line
X     and then wait for DCD.  To put it simply you should put up a
X     getty on ttyFM00 with a -t 60 and use ttyF00 for cu and
X     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 netmbx.UUCP
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     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---------------------------------------------------------------------
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 netmbx.UUCP
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
SHAR_EOF
if test 20046 -ne "`wc -c < 'README'`"
then
	echo shar: "error transmitting 'README'" '(should have been 20046 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 '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'" '(1266 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
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 1266 -ne "`wc -c < 'makefile.ISC'`"
then
	echo shar: "error transmitting 'makefile.ISC'" '(should have been 1266 characters)'
fi
fi
echo shar: "extracting 'makefile.uPort'" '(814 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
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 814 -ne "`wc -c < 'makefile.uPort'`"
then
	echo shar: "error transmitting 'makefile.uPort'" '(should have been 814 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'" '(4247 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 netmbx.UUCP
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.05"
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/* 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 form
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 hardware flow control flags
X   You can choose which signals to use for output 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	HH_BOTH,	HH_BOTH
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 4247 -ne "`wc -c < 'space-c1-2'`"
then
	echo shar: "error transmitting 'space-c1-2'" '(should have been 4247 characters)'
fi
fi
echo shar: "extracting 'space-c1-3'" '(4310 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 netmbx.UUCP
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.05"
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/* 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 form
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 hardware flow control flags
X   You can choose which signals to use for output 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	HH_BOTH,	HH_BOTH,	HH_BOTH
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 4310 -ne "`wc -c < 'space-c1-3'`"
then
	echo shar: "error transmitting 'space-c1-3'" '(should have been 4310 characters)'
fi
fi
echo shar: "extracting 'space-mux4'" '(4371 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 netmbx.UUCP
XBillstedter Pfad 17 B
X1000 Berlin 20
XWest Germany
X*/
X
X#ident	"@(#)space.c	2.05"
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/* 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 form
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 hardware flow control flags
X   You can choose which signals to use for output 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	HH_BOTH,	HH_BOTH,	HH_BOTH,	HH_BOTH
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 4371 -ne "`wc -c < 'space-mux4'`"
then
	echo shar: "error transmitting 'space-mux4'" '(should have been 4371 characters)'
fi
fi
exit 0
#	End of shell archive
-- 
Uwe Doering   |  Domain   : gemini at netmbx.UUCP
Berlin        |---------------------------------------------------------------
West Germany  |  Bangpath : ...!uunet!unido!tmpmbx!netmbx!gemini



More information about the Alt.sources mailing list