up | Inhaltsverzeichniss | Kommentar

Manual page for ZS(4S)

zs - Zilog 8530 SCC serial communications driver

CONFIG -- SUN-3 SYSTEM

device zs0 at obio ? csr 0x20000 flags 3 priority 3
device zs1 at obio ? csr 0x00000 flags 0x103 priority 3

CONFIG -- SUN-3x SYSTEM

device zs0 at obio ? csr 0x62002000 flags 3 priority 3
device zs1 at obio ? csr 0x62000000 flags 0x103 priority 3

CONFIG -- SUN-4 SYSTEM

device zs1 at obio ? csr 0xf0000000 flags 0x103 priority 3
device zs2 at obio 3 csr 0xe0000000 flags 3 priority 3

CONFIG -- Desktop SPARCsystems, SPARCsystem 600MP SERIES

device-driver zs

CONFIG -- Sun386i SYSTEM

device zs0 at obmem ? csr 0xFC000000 flags 3 irq 9 priority 6

device zs1 at obmem ? csr 0xA0000020 flags 0x103 irq 9 priority 6

SYNOPSIS

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

DESCRIPTION

The Zilog 8530 provides 2 serial communication ports with full modem control in asynchronous mode. Each port supports termio.4 device control functions specified by flags in the c_cflag word of the termios structure, and the functions specified by the IGNBRK, IGNPAR, PARMRK, and INPCK flags of the c_ciflag word of the termios structure. These functions are performed directly by the zs driver. All other termio.4 functions must be performed by STREAMS modules pushed atop 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.

Of the synopsis lines above, the line for zs0 specifies the serial I/O port(s) provided by the CPU board, the line for zs1 specifies the Video Board ports (which are used for keyboard and mouse), the lines for zs2 and zs3 specify the first and second ports on the first SCSI board in a system, and those for zs4 and zs5 specify the first and second ports provided by the second SCSI board in a system, respectively.

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 0x2 in the specification of zs0 would treat line /dev/ttyb in this way.

Minor device numbers in the range 0 - 11 correspond directly to the normal tty lines and are named /dev/ttya and /dev/ttyb for the two serial ports on the CPU board and /dev/ttysn for the ports on the SCSI boards; n is 0 or 1 for the ports on the first SCSI board, and 2 or 3 for the ports on the second SCSI board.

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 - 139 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 - 11 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 cannot 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, for example, to /dev/ttyd0 (renamed from /dev/ttya) 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.

IOCTLS

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

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:

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{a,b,s[0-3]}
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 mti.4s termio.4 ldterm.4m ttcompat.4m ttysoftcar.8

DIAGNOSTICS

zsnc: silo overflow.
The 8530 character input silo overflowed before it could be serviced.
zsnc: ring buffer overflow.
The driver's character input ring buffer overflowed before it could be serviced.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97