up | Inhaltsverzeichniss | Kommentar

Manual page for MCP(4S)

mcp, alm - Sun MCP Multiprotocol Communications Processor/ALM-2 Asynchronous Line Multiplexer

CONFIG -- SUN-3, SUN-3x, SUN-4, SPARCsystem 600MP SERIES


device mcp0 at vme32d32 ? csr 0x1000000 flags 0x1ffff priority 4 vector mcpintr 0x8b
device mcp1 at vme32d32 ? csr 0x1010000 flags 0x1ffff priority 4 vector mcpintr 0x8a
device mcp2 at vme32d32 ? csr 0x1020000 flags 0x1ffff priority 4 vector mcpintr 0x89
device mcp3 at vme32d32 ? csr 0x1030000 flags 0x1ffff priority 4 vector mcpintr 0x88
device mcp4 at vme32d32 ? csr 0x2000000 flags 0x1ffff priority 4 vector mcpintr 0xa0
device mcp5 at vme32d32 ? csr 0x2010000 flags 0x1ffff priority 4 vector mcpintr 0xa1
device mcp6 at vme32d32 ? csr 0x2020000 flags 0x1ffff priority 4 vector mcpintr 0xa2
device mcp7 at vme32d32 ? csr 0x2030000 flags 0x1ffff priority 4 vector mcpintr 0xa3


pseudo-device mcpa128


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


The Sun MCP (Multiprotocol Communications Processor) supports up to four synchronous serial lines in conjunction with SunLink® Multiple Communication Protocol products.


The Sun ALM-2 Asynchronous Line Multiplexer provides 16 asynchronous serial communication lines with modem control and one Centronics-compatible parallel printer port.

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 mcp 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.

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 mcp0 would treat line /dev/ttyh2 in this way.

Minor device numbers in the range 0 - 127 correspond directly to the normal tty lines and are named /dev/ttyXY, where X represents the physical board as one of the characters h, i, j, k, l, m, n, or o, and Y is the line number on the board as a single hexadecimal digit. Thus the first line on the first board is /dev/ttyh0, and the sixteenth line on the third board is /dev/ttyjf.

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 - 255 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 - 127 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 cannot be opened. This allows a modem to be attached, for example, to /dev/ttyd0 (renamed from /dev/ttyh0) and used for dialin (by enabling the line for login in /etc/ttytab) and also used for dialout (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.


The standard set of termio ioctl() calls are supported by the ALM-2.

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.


An open() on a /dev/tty* or a /dev/cu* device will fail if:
The unit being opened does not exist.
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.
The unit has been marked as exclusive-use by another process with a TIOCEXCL ioctl() call.
The open was interrupted by the delivery of a signal.


The parallel port is Centronics-compatible and is suitable for most common parallel printers. Devices attached to this interface are normally handled by the line printer spooling system, and should not be accessed directly by the user.

The printer devices reside on a separate major device number from the serial devices. Minor device numbers in the range 0 - 7 access the printer, and the recommended naming is /dev/mcpp[0-7].


Various control flags and status bits may be fetched and set on an MCP printer port. The following flags and status bits are supported; they are defined in sundev/mcpcmd.h:

MCPRIGNSLCT0x02set if interface ignoring SLCT- on open
MCPRDIAG   0x04set if printer port is in self-test mode
MCPRVMEINT 0x08set if VME bus interrupts enabled
MCPRINTPE  0x10print message when out of paper
MCPRINTSLCT0x20print message when printer offline
MCPRPE     0x40set if device ready, cleared if device out of paper
MCPRSLCT   0x80set if device online (Centronics SLCT asserted)

The flags MCPRINTSLCT, MCPRINTPE, and MCPRDIAG may be changed; the other bits are status bits and may not be changed.

The ioctl() calls supported by MCP printer ports are listed below.

The argument is a pointer to an unsigned char. The printer flags and status bits are stored in the unsigned char pointed to by the argument.
The argument is a pointer to an unsigned char. The printer flags are set from the unsigned char pointed to by the argument.


Normally, the interface only reports the status of the device when attempting an open.2v call. An open() on a /dev/mcpp* device will fail if:
The unit being opened does not exist.
The device is offline or out of paper.

Bit 17 of the configuration flags may be specified to say that the interface should ignore Centronics SLCT- and RDY/PE- when attempting to open the device, but this is normally useful only for configuration and troubleshooting: if the SLCT- and RDY lines are not asserted during an actual data transfer (as with a write.2v call), no data is transferred.


parallel printer port
hardwired tty lines
dialin tty lines
dialout tty lines


tip.1c uucp.1c mti.4s termio.4 ldterm.4m ttcompat.4m zs.4s


Most of these diagnostics ``should never happen''; their occurrence usually indicates problems elsewhere in the system as well.
mcpan: silo overflow.
More than n characters (n very large) have been received by the mcp hardware without being read by the software.
***port n supports RS449 interface***
Probably an incorrect jumper configuration. Consult the hardware manual.
mcp port n receive buffer error
The mcp encountered an error concerning the synchronous receive buffer.
Printer on mcppn is out of paper
Printer on mcppn paper ok
Printer on mcppn is offline
Printer on mcppn online
Assorted printer diagnostics, if enabled as discussed above.


Note: pin 4 is used for hardware flow control on ALM-2 ports 0 through 3. These two pins should not be tied together on the ALM end.

index | Inhaltsverzeichniss | Kommentar

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

Last modified 21/April/97