From: gemini@geminix.in-berlin.de (Uwe Doering)
Subject: FAS 2.10 async driver, part 5/5
Organization: Private UNIX Site
Date: Mon, 17 Aug 1992 11:38:19 GMT

Submitted-by: gemini@geminix.in-berlin.de
Archive-name: fas210/part05

#!/bin/sh
# this is fas210.05 (part 5 of fas210)
# do not concatenate these parts, unpack them in order with /bin/sh
# file fas.h continued
#
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 5; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
	echo 'x - still skipping fas.h'
else
echo 'x - continuing file fas.h'
sed 's/^X//' << 'SHAR_EOF' >> 'fas.h' &&
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_NS_FIFO	0x80	/* NS16550A 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 (NS16550A only) */
X
X#define	NS_FIFO_ENABLE		0x01
X#define	NS_FIFO_CLR_RECV	0x02
X#define	NS_FIFO_CLR_XMIT	0x04
X#define	NS_FIFO_START_DMA	0x08
X#define NS_FIFO_SIZE_1		0x00
X#define NS_FIFO_SIZE_4		0x40
X#define NS_FIFO_SIZE_8		0x80
X#define NS_FIFO_SIZE_14		0xC0
X#define NS_FIFO_SIZE_MASK	0xC0
X
X#define NS_FIFO_CLEAR_CMD	0
X#if defined (LOW_INT_LAT)
X#define NS_FIFO_SETUP_CMD	(NS_FIFO_SIZE_8 | NS_FIFO_ENABLE)
X#else
X#define NS_FIFO_SETUP_CMD	(NS_FIFO_SIZE_4 | NS_FIFO_ENABLE)
X#endif
X#define NS_FIFO_INIT_CMD	(NS_FIFO_SETUP_CMD | NS_FIFO_CLR_RECV \
X				| NS_FIFO_CLR_XMIT)
X
X#define INPUT_NS_FIFO_SIZE	16
X#define OUTPUT_NS_FIFO_SIZE	16
X
X/* fifo control ports (i82510 only) */
X
X#define I_BANK_0		0x00
X#define I_BANK_1		0x20
X#define I_BANK_2		0x40
X#define I_BANK_3		0x60
X#define I_FIFO_ENABLE		0x08
X#define I_FIFO_CLR_RECV		0x30
X#define I_FIFO_CLR_XMIT		0x0c
X
X#define I_FIFO_CLEAR_CMD	0
X#define I_FIFO_SETUP_CMD	I_FIFO_ENABLE
X
X#define INPUT_I_FIFO_SIZE	4
X#define OUTPUT_I_FIFO_SIZE	4
X
X/* defines for ioctl calls (VP/ix) */
X
X#define AIOC			('A'<<8)
X#define AIOCINTTYPE		(AIOC|60)	/* set interrupt type */
X#define AIOCDOSMODE		(AIOC|61)	/* set DOS mode */
X#define AIOCNONDOSMODE		(AIOC|62)	/* reset DOS mode */
X#define AIOCSERIALOUT		(AIOC|63)	/* serial device data write */
X#define AIOCSERIALIN		(AIOC|64)	/* serial device data read */
X#define AIOCSETSS		(AIOC|65)	/* set start/stop chars */
X#define AIOCINFO		(AIOC|66)	/* tell us what device we are */
X
X/* ioctl alternate names used by VP/ix */
X
X#define VPC_SERIAL_DOS		AIOCDOSMODE
X#define VPC_SERIAL_NONDOS	AIOCNONDOSMODE
X#define VPC_SERIAL_INFO		AIOCINFO
X#define VPC_SERIAL_OUT		AIOCSERIALOUT
X#define VPC_SERIAL_IN		AIOCSERIALIN
X
X/* serial in/out requests */
X
X#define SO_DIVLLSB		1
X#define SO_DIVLMSB		2
X#define SO_LCR			3
X#define SO_MCR			4
X#define SI_MSR			1
X#define SIO_MASK(x)		(1<<((x)-1))
X
X
X/* This structure contains everything one would like to know about
X   an open device.  There is one of it 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   Take care that the size of the area that contains the various
X   structure fields (up to, but excluding the ring buffers)
X   is <= 128 bytes. Otherwise a 4-byte offset is used to access
X   some of the structure fields. For the first 128 bytes a 1-byte
X   offset is used, which is faster.
X*/
X
Xstruct	fas_internals
X{
X	struct	tty	*tty;	/* the tty structure */
X	struct	fas_internals *prev_int_user;/* link to previous struct */
X	struct	fas_internals *next_int_user;/* link to next struct */
X	int	timeout_idx;	/* timeout index for untimeout () */
X	n_ushort iflag;		/* current terminal input flags */
X	n_ushort cflag;		/* current terminal hardware control flags */
X	union {			/* flags about the device state */
X		ushort	s;
X		n_ushort i;
X	} device_flags;
X	union {			/* flags about the flow control state */
X		ushort	s;
X		n_ushort i;
X	} flow_flags;
X	union {			/* flags about the scheduled events */
X		ushort	s;
X		n_ushort i;
X	} event_flags;
X	n_ushort o_state;	/* current open state */
X	n_ushort po_state;	/* previous open state */
X	union {			/* modem control masks */
X		struct {
X			unchar	di;	/* mask for modem disable */
X			unchar	eo;	/* mask for modem enable (dialout) */
X			unchar	ei;	/* mask for modem enable (dialin) */
X			unchar	ca;	/* mask for carrier detect */
X		} m;
X		ulong	l;
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			unchar	hc;	/* control mask for hdx flow ctrl */
X		} m;
X		ulong	l;
X	} flow;
X	unchar	msr;		/* modem status register value */
X	unchar	new_msr;	/* new modem status register value */
X	unchar	lsr;		/* line status register value */
X	unchar	mcr;		/* modem control register value */
X	unchar	lcr;		/* line control register value */
X	unchar	ier;		/* interrupt enable register value */
X	unchar	device_type;	/* device type determined by fasinit () */
X	unchar	start_char;	/* start character for software flow control */
X	unchar	stop_char;	/* stop character for software flow control */
X#if defined (HAVE_VPIX)
X	unchar	v86_intmask;	/* VP/ix pseudorupt mask */
X	v86_t	*v86_proc;	/* VP/ix v86proc pointer for pseudorupts */
X#endif
X	uint	ctl_port;	/* muliplexer control port */
X	union {			/* uart port addresses and control values */
X		uint	addr;
X		struct {
X			ushort	addr;
X			unchar	ctl;
X		} p;
X	} port_0, port_1, port_2, port_3, port_4, port_5, port_6;
X	n_ushort 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	ushort	xmit_fifo_size;	/* transmitter FIFO size */
X	ushort	xmit_ring_size;	/* transmitter ring buffer size */
X	n_ushort 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
echo 'File fas.h is complete' &&
true || echo 'restore of fas.h failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-ast4 ==============
if test -f 'i_fas-ast4' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-ast4 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-ast4 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
XF2:23:off:/etc/getty ttyFM02 9600
XF3:23:off:/etc/getty ttyFM03 9600
SHAR_EOF
true || echo 'restore of i_fas-ast4 failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-ast4c12 ==============
if test -f 'i_fas-ast4c12' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-ast4c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-ast4c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4c12' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
XF2:23:off:/etc/getty ttyFM02 9600
XF3:23:off:/etc/getty ttyFM03 9600
XF4:23:off:/etc/getty ttyFM04 9600
XF5:23:off:/etc/getty ttyFM05 9600
SHAR_EOF
true || echo 'restore of i_fas-ast4c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-c12 ==============
if test -f 'i_fas-c12' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c12' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
SHAR_EOF
true || echo 'restore of i_fas-c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-c123 ==============
if test -f 'i_fas-c123' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-c123 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-c123 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c123' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
XF2:23:off:/etc/getty ttyFM02 9600
SHAR_EOF
true || echo 'restore of i_fas-c123 failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-digi8c1 ==============
if test -f 'i_fas-digi8c1' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-digi8c1 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-digi8c1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-digi8c1' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
XF2:23:off:/etc/getty ttyFM02 9600
XF3:23:off:/etc/getty ttyFM03 9600
XF4:23:off:/etc/getty ttyFM04 9600
XF5:23:off:/etc/getty ttyFM05 9600
XF6:23:off:/etc/getty ttyFM06 9600
XF7:23:off:/etc/getty ttyFM07 9600
XF8:23:off:/etc/getty ttyFM08 9600
SHAR_EOF
true || echo 'restore of i_fas-digi8c1 failed'
rm -f _shar_wnt_.tmp
fi
# ============= i_fas-hub6 ==============
if test -f 'i_fas-hub6' -a X"$1" != X"-c"; then
	echo 'x - skipping i_fas-hub6 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting i_fas-hub6 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'i_fas-hub6' &&
XF0:23:off:/etc/getty ttyFM00 9600
XF1:23:off:/etc/getty ttyFM01 9600
XF2:23:off:/etc/getty ttyFM02 9600
XF3:23:off:/etc/getty ttyFM03 9600
XF4:23:off:/etc/getty ttyFM04 9600
XF5:23:off:/etc/getty ttyFM05 9600
SHAR_EOF
true || echo 'restore of i_fas-hub6 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-ast4 ==============
if test -f 'n_fas-ast4' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-ast4 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-ast4 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyF02	c	82
Xfas	ttyF03	c	83
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
Xfas	ttyFM03	c	211
SHAR_EOF
true || echo 'restore of n_fas-ast4 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-ast4c12 ==============
if test -f 'n_fas-ast4c12' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-ast4c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-ast4c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4c12' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyF02	c	82
Xfas	ttyF03	c	83
Xfas	ttyF04	c	84
Xfas	ttyF05	c	85
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
Xfas	ttyFM03	c	211
Xfas	ttyFM04	c	212
Xfas	ttyFM05	c	213
SHAR_EOF
true || echo 'restore of n_fas-ast4c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-c12 ==============
if test -f 'n_fas-c12' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c12' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
SHAR_EOF
true || echo 'restore of n_fas-c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-c123 ==============
if test -f 'n_fas-c123' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-c123 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-c123 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c123' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyF02	c	82
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
SHAR_EOF
true || echo 'restore of n_fas-c123 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-digi8c1 ==============
if test -f 'n_fas-digi8c1' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-digi8c1 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-digi8c1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-digi8c1' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyF02	c	82
Xfas	ttyF03	c	83
Xfas	ttyF04	c	84
Xfas	ttyF05	c	85
Xfas	ttyF06	c	86
Xfas	ttyF07	c	87
Xfas	ttyF08	c	88
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
Xfas	ttyFM03	c	211
Xfas	ttyFM04	c	212
Xfas	ttyFM05	c	213
Xfas	ttyFM06	c	214
Xfas	ttyFM07	c	215
Xfas	ttyFM08	c	216
SHAR_EOF
true || echo 'restore of n_fas-digi8c1 failed'
rm -f _shar_wnt_.tmp
fi
# ============= n_fas-hub6 ==============
if test -f 'n_fas-hub6' -a X"$1" != X"-c"; then
	echo 'x - skipping n_fas-hub6 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting n_fas-hub6 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'n_fas-hub6' &&
Xfas	ttyF00	c	80
Xfas	ttyF01	c	81
Xfas	ttyF02	c	82
Xfas	ttyF03	c	83
Xfas	ttyF04	c	84
Xfas	ttyF05	c	85
Xfas	ttyFM00	c	208
Xfas	ttyFM01	c	209
Xfas	ttyFM02	c	210
Xfas	ttyFM03	c	211
Xfas	ttyFM04	c	212
Xfas	ttyFM05	c	213
SHAR_EOF
true || echo 'restore of n_fas-hub6 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-ast4 ==============
if test -f 's_fas-ast4' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-ast4 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-ast4 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4' &&
Xfas	Y	4	7	1	4	2a0	2bf	0	0
SHAR_EOF
true || echo 'restore of s_fas-ast4 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-ast4c12 ==============
if test -f 's_fas-ast4c12' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-ast4c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-ast4c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4c12' &&
Xfas	Y	4	7	1	9	2a0	2bf	0	0
Xfas	Y	1	7	1	4	3f8	3ff	0	0
Xfas	Y	1	7	1	3	2f8	2ff	0	0
SHAR_EOF
true || echo 'restore of s_fas-ast4c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-c12 ==============
if test -f 's_fas-c12' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-c12' &&
Xfas	Y	1	7	1	4	3f8	3ff	0	0
Xfas	Y	1	7	1	3	2f8	2ff	0	0
SHAR_EOF
true || echo 'restore of s_fas-c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-c123 ==============
if test -f 's_fas-c123' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-c123 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-c123 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-c123' &&
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
true || echo 'restore of s_fas-c123 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-digi8c1 ==============
if test -f 's_fas-digi8c1' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-digi8c1 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-digi8c1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-digi8c1' &&
Xfas	Y	8	7	1	3	100	13f	0	0
Xfas	Y	1	7	1	4	3f8	3ff	0	0
SHAR_EOF
true || echo 'restore of s_fas-digi8c1 failed'
rm -f _shar_wnt_.tmp
fi
# ============= s_fas-hub6 ==============
if test -f 's_fas-hub6' -a X"$1" != X"-c"; then
	echo 'x - skipping s_fas-hub6 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting s_fas-hub6 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's_fas-hub6' &&
Xfas	Y	6	7	1	3	302	308	0	0
SHAR_EOF
true || echo 'restore of s_fas-hub6 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-ast4 ==============
if test -f 'space-ast4' -a X"$1" != X"-c"; then
	echo 'x - skipping space-ast4 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-ast4 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-ast4' &&
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the AST 4-port card in expanded mode.
X*/
X 
X/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x2a0,	0x2a8,	0x2b0,	0x2b8
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0x2bf,	0x80,
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-ast4 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-ast4c12 ==============
if test -f 'space-ast4c12' -a X"$1" != X"-c"; then
	echo 'x - skipping space-ast4c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-ast4c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-ast4c12' &&
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the AST 4-port card in expanded mode plus
X   the standard COM1 and COM2 ports.
X*/
X 
X/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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	6
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x2a0,	0x2a8,	0x2b0,	0x2b8,
X	0x3f8,	0x2f8
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0x2bf,	0x80,
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
X*/
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0,
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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0,
X	0,	0
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0,
X	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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-ast4c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-c12 ==============
if test -f 'space-c12' -a X"$1" != X"-c"; then
	echo 'x - skipping space-c12 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-c12 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-c12' &&
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/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x3f8,	0x2f8
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
X	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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-c12 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-c123 ==============
if test -f 'space-c123' -a X"$1" != X"-c"; then
	echo 'x - skipping space-c123 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-c123 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-c123' &&
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/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x3f8,	0x2f8,	0x3e8
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
X	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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-c123 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-digi8c1 ==============
if test -f 'space-digi8c1' -a X"$1" != X"-c"; then
	echo 'x - skipping space-digi8c1 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-digi8c1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-digi8c1' &&
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the DigiChannel PC/8 card plus the standard
X   COM1 port.
X*/
X 
X/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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	9
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x100,	0x108,	0x110,	0x118,
X	0x120,	0x128,	0x130,	0x138,
X	0x3f8
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
X*/
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	MC_SET_OUT2,	MC_SET_OUT2,	MC_SET_OUT2,	MC_SET_OUT2,
X	MC_SET_OUT2,	MC_SET_OUT2,	MC_SET_OUT2,	MC_SET_OUT2,
X	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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS,
X	HI_RTS | HO_CTS_ON_DSR | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	0
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	0,	0,
X	0,	0,	0,	0,
X	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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-digi8c1 failed'
rm -f _shar_wnt_.tmp
fi
# ============= space-hub6 ==============
if test -f 'space-hub6' -a X"$1" != X"-c"; then
	echo 'x - skipping space-hub6 (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting space-hub6 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'space-hub6' &&
X/* Async device configuration file for the FAS async driver. */
X
X/* This version is for the Bell Tech HUB-6 card.
X*/
X 
X/* FAS was developed by
XUwe Doering             INET : gemini@geminix.in-berlin.de
XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
X1000 Berlin 20
XGermany
X*/
X
X#if !defined (M_I286)
X#ident	"@(#)space.c	2.10"
X#endif
X
X#if defined (XENIX)
X#include "fas.h"
X#else
X#include <sys/fas.h>
X#endif
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	6
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
X   Some modifier flags can be "ored" into these addresses to change
X   the behaviour of the respective devices. See fas.h for possible
X   names and values.
X*/
Xulong	fas_port [NUM_PHYSICAL_UNITS] =
X{
X	0x303,	0x303,	0x303,	0x303,	0x303,	0x303
X};
X
X/* initialization sequence for serial cards
X   This array contains pairs of values of the form:
X
X        portaddress, value,
X              :
X              :
X        portaddress, value,
X        0
X
X   For every line `value' will be written to `portaddress'. If
X   `value' is replaced with the macro `READ_PORT' then a value
X   is read from `portaddress' instead. The value itself will be
X   discarded. Therefore, this makes only sense if the read access
X   to the port has a side effect like setting or resetting
X   certain flags.
X
X   NOTE: This array *must* be terminated with a value of 0
X         in the portaddress column!
X*/
Xuint	fas_init_seq [] =
X{
X	0
X};
X
X/* interrupt acknowledge sequence for serial cards
X   This sequence is executed by the fasintr () function after all pending
X   interrupts on all serial cards have been processed. The contents of this
X   array has the same form as in the fas_init_seq [] array above.
X*/
Xuint	fas_int_ack_seq [] =
X{
X	0
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   shared interrupts card. One of these cards is the AST 4-port card. When
X   this card is used in shared interrupts mode out2 must _not_ be set.
X
X   Note: This is one of the major trouble-spots with shared interrupts
X   cards. Check your manual.
X*/
Xuint	fas_mcb [NUM_PHYSICAL_UNITS] =
X{
X	0,	0,	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*/
Xulong	fas_modem [NUM_PHYSICAL_UNITS] =
X{
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD,
X	EO_DTR | EI_DTR | CA_DCD
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 and by the
X   RTSFLOW/CTSFLOW termio(7) flags.
X*/
Xulong	fas_flow [NUM_PHYSICAL_UNITS] =
X{
X	HI_RTS | HO_CTS | HX_RTS,
X	HI_RTS | HO_CTS | HX_RTS,
X	HI_RTS | HO_CTS | HX_RTS,
X	HI_RTS | HO_CTS | HX_RTS,
X	HI_RTS | HO_CTS | HX_RTS,
X	HI_RTS | HO_CTS | HX_RTS
X};
X
X/* array of control register addresses
X   There are serial boards available that have all serial ports
X   multiplexed to one address location in order to save I/O address
X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
X   by a special register that needs to be written to before the actual
X   port registers can be accessed. This array contains the addresses
X   of these special registers.
X   Enter the addresses on a per unit base. An address of zero
X   disables this feature.
X*/
Xuint	fas_ctl_port [NUM_PHYSICAL_UNITS] =
X{
X	0x302,	0x302,	0x302,	0x302,	0x302,	0x302
X};
X
X/* array of control register values
X   These values are written to the corresponding control register
X   before the first access to the actual port registers. If not only
X   entire UART chips (blocks of 8 contiguous addresses) but even the
X   single registers of the UART chips need to be multiplexed to one
X   address you have to "or" a bit mask (shifted 8 times to the left)
X   to the control register value. This mask determines at which bit
X   locations the UART chip register number is "xored" into the control
X   register value at runtime. This implies that you can also use
X   negative logic by setting the bits in the control register value
X   to 1 at the locations corresponding to the bit mask.
X*/
Xuint	fas_ctl_val [NUM_PHYSICAL_UNITS] =
X{
X	0x700,	0x708,	0x710,	0x718,	0x720,	0x728
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_internals	fas_internals [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_internals structures
X   this prevents time consuming multiplications for index calculation
X*/
Xstruct fas_internals	*fas_internals_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
true || echo 'restore of space-hub6 failed'
rm -f _shar_wnt_.tmp
fi
# ============= update_desc ==============
if test -f 'update_desc' -a X"$1" != X"-c"; then
	echo 'x - skipping update_desc (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting update_desc (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'update_desc' &&
X# Update the kernel description file
X
Xgrep '^fas[ 	]' $1 > /dev/null 2>&1
Xif [ $? -eq 1 ]
Xthen
X	echo 'fas     -    -     io     -             FAS Serial I/O Driver' >> $1
Xfi
SHAR_EOF
true || echo 'restore of update_desc failed'
rm -f _shar_wnt_.tmp
fi
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
-- 
Uwe Doering  |  INET : gemini@geminix.in-berlin.de
Berlin       |----------------------------------------------------------------
Germany      |  UUCP : ...!unido!fub!geminix.in-berlin.de!gemini