# README.DIGI  version 1.0

DigiBoard PC/Xe PC/Xi driver (pcxe.c) and Installation program (digisetup)
Copyright (C) 1994  Troy De Jongh   troyd@digibd.com or troyd@skypoint.com

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Requirements
------------
You must be using a kernel with Ted Ts'o's new TTY subsystem.  My
driver has been run on 1.1.23, 1.1.41, 1.1.45, and 1.1.64 (those
are the releases that I developed with).  I'm not sure of the
release number where the TTY subsystem was revamped. :-(
A good lithmus test--I think--would be to check for the n_tty.c,
tty_io.c, tty_ioctl.c files in /usr/src/linux/drivers/char.  If
these files exist, I would think that you have the new TTY subsystem.


Distribution Files
------------------

This distribution contains these file:

	pcxe.c         DigiBoard PC/Xe and PC/Xi driver
	pcxx.h         Driver data structures and defines
	fep.h          FEP/OS data structures and defines
	digi.h         Include files needed by the driver
	digi_fep.h     DigiBoard's onboard FEP/OS
	digi_bios.h    DigiBoard's onboard BIOS
	pcxxconfig.h   Configuration file generated by digisetup
                   (DO NOT EDIT BY HAND!!!)
	ditty.c        ditty program to set Digi-specific port options
	digisetup      GUI configuration program to add or remove boards
	dialog         program needed for digisetup.  Place in /bin directory.


All these files should be in the /usr/src/linux/drivers/char directory.
You can move ditty.c and copy the needed include files to a separate
directory if you wish.  To make ditty, simple type 'make ditty'.
Also, you can move the 'digisetup' program to a 'bin' directory if you
wish.  It is not dependent on it's current directory.

Changes
-------

The following changes must be made to files in the Linux kernel distribution
in order for the driver to compile.  The changes are few and simple:

	1.  In the file /usr/src/linux/drivers/char/tty_io.c, add this
	    line below the "kmem_start = pty_init(kmem_start);" line:

			kmem_start = pcxe_init(kmem_start);

	2.  In the file /usr/include/linux/tty.h, add this line below
	    the "extern long tty_init(long);" line:

	        extern long pcxe_init(long);

	    Also, add this line below the "extern int pty_open(..." line:

			extern int pcxe_open(struct tty_struct *tty, struct file *filp);

	3.  In the file /usr/include/linux/interrupt.h, add this line
	    under the "TQUEUE_BH," line:

	        DIGI_BH,

	4.  In the file /usr/src/linux/drivers/char/Makefile, add the 
	    word "pcxe.o" to the "OBJS=" line and add the word "pcxe.c"
	    to the "SRCS=" line. 

	5.  Now you are set.  The pcxxconfig.h file in the drivers/char
	    directory contains the information on how many boards are
	    configured and where their I/O addresses are, etc.  Do not
	    edit this file by hand!  This file is parsed and generated
	    by the 'digisetup' configuration utility.  It is then used
	    during compilation so that when the machine boots up, it 
	    can find the boards at their respective memories and I/O
	    ports.

	    Run the 'digisetup' configuration utility to add your board(s).
	    Be sure you choose memory addresses and I/O ports that do
	    not conflict with other devices.  The device files will be
	    created for you, after asking your permission.  Non-modem
	    devices are /dev/ttyd* and modem-control devices are /dev/ttyD*.
		Their major numbers are 30 and 31 respectively.  If this
	    conflicts with your setup (I'm pretty sure it won't), feel
	    free to change the DIGIMAJOR and DIGICUMAJOR variables to change
	    the major numbers of the devices.	

		After you have run the 'digisetup' utility, rebuild the kernel.

	6.  A word about /etc/inittab and getty.  Each card has 16 devices
	    assigned to it--even if it's a 2-port card.  Thus, a PC/2e
	    will have tty[dD]1 - tty[dD]16 allocated to it, even though
	    only tty[dD]1 - tty[dD]2 are available for opening.  Attempts
	    to open tty[dD]3 on a PC/2e, for example, will result in a
	    "No such device" or (ENODEV) error.

	    Board 1 will have tty[dD]1 - tty[dD]16, board 2 will own
	    tty[dD]17 - tty[dD]32, and so on, up to seven boards for
	    a total of 112 ports.  Why seven boards?  There are only
	    seven available I/O addresses on the cards.  :-)

	    Here is a typical entry I have in my /etc/inittab for non-
	    modem control devices:

            e2:45:respawn:/sbin/agetty -L 110 ttyd18

	    ttyd18 is the 2nd port on the 2nd board.  The '-L' option
	    must be specified for non-modem control devices to force
	    CLOCAL.  Otherwise it will just hang after typing your
	    login name, waiting for carrier detect.  The 110 baud
	    maps to 115K baud when fastbaud is turned on.  Fastbaud
	    should be turned on in the /etc/rc.d/rc.local file with
	    the following command:

	        ditty fastbaud ttyd18

	    This ensures that fastbaud is enabled on ttyd18 by the time 
	    the getty is spawned.  :-)  Fastbaud is a 'sticky' option (i.e.
	    the port doesn't have to remain open for the setting to stick).
	    The ditty command should be used in the /etc/rc.d/rc.local
	    much in the same way the setserial command is used to configure
	    the com ports.  One more example, "ditty altpin ttyd18" can be 
	    used to enable the altpin feature without running 'digisetup' 
	    and recompiling the kernel.

		If you want someone to be able to call into your machine on
	    board 4, port 1, with a modem, try this line:

			d1:45:respawn:/sbin/agetty 38400 ttyD65

	    

Disclaimer
----------
This driver is provided by Troy De Jongh and not by DigiBoard.  Please
do not call DigiBoard Technical Support to help you with problems you
are having with the _driver_.  If you are having problems with the
driver, contact me at troyd@skypoint.com.  Please email me concerning
any bugs.  I will be more than happy to fix any valid reported bugs.
As per the GPL, I, Troy De Jongh, am not responsible for any damages
due to the use of my drivers and/or programs.  Before recompiling
the kernel to use the driver, make a backup boot disk if you
don't already have one...and backup your data!



Beta Testing
------------
I _want_ to hear if you were successful in running 7 boards simultaneously,
or if you have any benchmark issues.  I have not tried PPP or SLIP yet,
so it may not work.  I may have left out a few line discipline hooks, but
I don't think so.  I would like to hear how PPP worked for you.
Also, feel free to email me on how you are using this driver...which
products, how many, and where did you purchase the boards?  In general,
please gimme some feedback!  ;-)

	-Troy De Jongh       troyd@skypoint.com
