Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mcpzsa(7) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tip(1)

uucp(1C)

ldterm(7)

termio(7)

ttcompat(7)

zs(7)

mcpzsa(7)

NAME

mcpzsa − ALM-2 Zilog 8530 SCC serial communications driver

SYNOPSIS

#include <fcntl.h>
#include <sys/termios.h>
open("/dev/term/n", mode);
open("/dev/cua/n", mode);

DESCRIPTION

The ALM-2 board provides 16 serial input/output channels that are capable of supporting a variety of communication protocols.  A typical system uses these devices to implement essential functions, including RS-423 ports (which also support most RS-232 equipment). 

The mcpzsa module is a loadable STREAMS driver that provides basic support for the 8530 hardware, together with basic asynchronous communication support.  The driver supports those termio(7) 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.  All other termio(7) functions must be performed by STREAMS modules pushed atop the driver.  When a device is opened, the ldterm(7) and ttcompat(7) STREAMS modules are automatically pushed on top of the stream, providing the standard termio(7) interface. 

The character-special devices /dev/term/[0-15] are used to access the serial ports on the first ALM-2 board. 

Subsequent instances of the ALM-2 board will use the next 16 numbers in sequence.  These term/n devices have minor device numbers in the range 0 − 127. 

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, is available.  By accessing character-special devices with names of the form /dev/cua/n, it is possible to open a port without the Carrier Detect signal being asserted, either through hardware or an equivalent software mechanism.  These devices are commonly known as dial-out lines and have minor numbers 256 greater than their corresponding dial-in lines. 

Once a /dev/cua/n line is opened, the corresponding term line cannot be opened until the /dev/cua/n line is closed; a blocking open will wait until the /dev/cua/n 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/term/n line has been opened successfully (usually only when carrier is recognized by the modem) the corresponding /dev/cua/n line can not be opened.  This allows a modem to be attached to, for example, /dev/term/0 and used for dial-in (by enabling the line for login in /etc/inittab) and also used for dial-out (by tip(1) or uucp(1C)) as /dev/cua/0 when no one is logged in on the line. 

IOCTLS

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

If the CRTSCTS flag in the c_cflag is set, output will be generated only if CTS is high; if CTS is low, output will be frozen.   If the CRTSCTS flag is clear, the state of CTS has no effect.  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. 

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. 

ERRORS

An open() will fail if:

ENODEV The unit being opened does not exist. 

EPROTO An unsupported or non-serial protocol has been requested. 

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/term/[0-127] hardwired tty lines

/dev/cua/[0-127] dial-out tty lines

SEE ALSO

tip(1), uucp(1C), ldterm(7), termio(7), ttcompat(7), zs(7)

DIAGNOSTICS

mcpzsanc: parity error ignored.
A parity error was detected and disregarded due to the IGNPAR flag being set. 

mcpzsanc: SCC silo overflow.
The 8530 character input silo overflowed before it could be serviced.

mcpzsanc: input ring overflow.
The driver’s character input ring buffer overflowed before it could be serviced.

NOTES

The character-special device names may not always be aligned on multiples of 16 if other serial port devices, such as SPIF devices are present on the system. 

SunOS 5.4  —  Last change: 8 Mar 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026