MTI(4S)

NAME
mti - Systech MTI-800/1600 multi-terminal interface

CONFIG — SUN-3, SUN-3x, SUN-4 SYSTEMS
device mti0 at vme16d16 ? csr 0x620 flags 0xffff priority 4 vector mtiintr 0x88
device mti1 at vme16d16 ? csr 0x640 flags 0xffff priority 4 vector mtiintr 0x89
device mti2 at vme16d16 ? csr 0x660 flags 0xffff priority 4 vector mtiintr 0x8a
device mti3 at vme16d16 ? csr 0x680 flags 0xffff priority 4 vector mtiintr 0x8b

SYNOPSIS
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/ttyxy", mode);
open("/dev/ttydn", mode);
open("/dev/cuan", mode);

DESCRIPTION

The Systech MTI card provides 8 (MTI-800) or 16 (MTI-1600) serial communication lines with modem control. Each port supports those termio(4) device control functions specified by flags in the c_cflag word of the termios structure and by the IGNBRK, IGNPAR, PARMRK, or INPCK flags in the c_iflag word of the termios structure are performed by the mti driver. All other termio(4) functions must be performed by STREAMS modules pushed on top of the driver; when a device is opened, the ldterm(4M) and ttcompat(4M) STREAMS modules are automatically pushed on top of the stream, providing the standard termio(4) interface.

Bit i of flags may be specified to say that a line is not properly connected, and that the line i should be treated as hard-wired with carrier always present. Thus specifying flags 0x0004 in the specification of mti0 would treat line /dev/tty02 in this way.

Minor device numbers in the range 0 - 63 correspond directly to the normal tty lines and are named /dev/ttyXY, where X is the physical board number (0 - 3), and Y is the line number on the board as a single hexadecimal digit. Thus the first line on the first board is /dev/tty00, and the sixteenth line on the third board is /dev/tty2f.

To allow a single tty line to be connected to a modem and used for both incoming and outgoing calls, a special feature, controlled by the minor device number, has been added. Minor device numbers in the range 128 - 191 correspond to the same physical lines as those above (that is, the same line as the minor device number minus 128).

A dial-in line has a minor device in the range 0 - 63 and is conventionally renamed /dev/ttydn, where n is a number indicating which dial-in line it is (so that /dev/ttyd0 is the first dial-in line), and the dial-out line corresponding to that dial-in line has a minor device number 128 greater than the minor device number of the dial-in line and is conventionally named /dev/cuan, where n is the number of the dial-in line.

The /dev/cuan lines are special in that they can be opened even when there is no carrier on the line. Once a /dev/cuan line is opened, the corresponding tty line can not be opened until the /dev/cuan line is closed; a blocking open will wait until the /dev/cuan line is closed (which will drop Data Terminal Ready, after which Carrier Detect will usually drop as well) and carrier is detected again, and a non-blocking open will return an error. Also, if the /dev/ttydn line has been opened successfully (usually only when carrier is recognized on the modem) the corresponding /dev/cuan line can not be opened. This allows a modem to be attached to for example, /dev/ttyd0 (renamed from /dev/tty00) and used for dial-in (by enabling the line for login in /etc/ttytab) and also used for dial-out (by tip(1C) or uucp(1C)) as /dev/cua0 when no one is logged in on the line. Note: the bit in the flags word in the configuration file (see above) must be zero for this line, which enables hardware carrier detection.

WIRING
The Systech requires the CTS modem control signal to operate. If the device does not supply CTS then RTS should be jumpered to CTS at the distribution panel (short pins 4 to 5). Also, the CD (carrier detect) line does not work properly. When connecting a modem, the modem's CD line should be wired to DSR, which the software will treat as carrier detect.

IOCTLS
The standard set of termio ioctl() calls are supported by mti.

The state of the CRTSCTS flag in the c_cflag word has no effect; no output will be generated unless CTS is high. Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl() calls. The modem control lines TIOCM_CAR, TIOCM_CTS, TIOCM_RTS, and TIOCM_DTR are provided; however, as described above, the DSR line is treated as CD and the CD line is ignored.

The input and output line speeds may be set to any of the speeds supported by termio. The speeds cannot be set independently; when the output speed is set, the input speed is set to the same speed. The baud rates B200 and B38400 are not supported by the hardware; B200 selects 2000 baud, and B38400 selects 7200 baud.

ERRORS

An open() will fail if:

ENXIO
    The unit being opened does not exist.

EBUSY
    The dial-out device is being opened and the dial-in device is already open, or the dial-in device is being opened with a no-delay open and the dial-out device is already open.

EBUSY
    The unit has been marked as exclusive-use by another process with a TIOCEXCL ioctl() call.

EINTR
    The open was interrupted by the delivery of a signal.

FILES
/dev/tty[0-3][0-9a-f]
    hardwired tty lines
/dev/ttyd[0-9a-f]
    dial-in tty lines
/dev/cua[0-9a-f]
    dial-out tty lines

SEE ALSO
tip(1C), uucp(1C), mcp(4S), termio(4), ldterm(4M), ttcompat(4M), zs(4S), ttysoftcar(8)

DIAGNOSTICS

Most of these diagnostics “should never happen” and their occurrence usually indicates problems elsewhere in the system.

mtin, n: silo overflow.
    More than 512 characters have been received by the mti hardware without being read by the software. Extremely unlikely to occur.

mtin: read error code <n>. Probable hardware fault
    The mti returned the indicated error code. See the MTI manual.

mtin: DMA output error.
    The mti encountered an error while trying to do DMA output.

mtin: impossible response n.
    The mti returned an error it could not understand.