MCP(4S) — SPECIAL FILES
NAME
mcp, alm − Sun MCP Multiprotocol Communications Processor/ALM-2 Asynchronous Line Multiplexer
SYNOPSIS — SUN-3
MCP
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
ALM-2
pseudo-device mcpa64
DESCRIPTION
MCP
The Sun MCP Multiprotocol Communications Processor board provides hardware support for the ALM-2 Asynchronous Line Multiplexer and the SunLink™ Multiple Communication Protocol products.
The MCP board supports up to sixteen asynchronous serial lines and one parallel printer port.
The printer 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.
Minor device numbers in the range 64−67 access the printer port, and the recommended naming is /dev/mcpp[0-3].
Device Status
Normally, the interface only reports the status of the device when attempting an open(2) call.
Errors
Opening the device /dev/mcpp∗ may yield one of two errors:
ENXIOindicates that the device is already in use
EIOindicates that 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(2) call), no data is transferred.
Optionally, the interface may be set to print a message to the console when either the paper-out or offline conditions obtain. To set this mode, you should include <sundev/mcpcmd.h> and use the ioctl(2) call:
unsigned char mode;
ioctl(fd, MCPIOSPR, &mode);
The bits in are defined as follows:
| MCPRINTSLCT | 0x20 | notify on console if device goes offline |
| MCPRINTPE | 0x10 | notify on console if device runs out of paper |
| MCPRDIAG | 0x04 | set self-test mode (not ordinarily useful) |
The ioctl call:
ioctl(fd, MCPIOGPR, &mode);
returns in mode the current status of the parallel port, defined as follows:
| MCPRIGNSLCT | 0x02 | set if interface ignoring SLCT− on open |
| MCPRDIAG | 0x04 | set if in self-test loopback mode |
| MCPRVMEINT | 0x08 | set if VME bus interrupts enabled |
| MCPRINTPE | 0x10 | set if paper-out notification enabled |
| MCPRINTSLCT | 0x20 | set if offline notification enabled |
| MCPRPE | 0x40 | set if device ready, cleared if device out of paper |
| MCPRSLCT | 0x80 | set if device online (Centronics SLCT asserted) |
ALM-2
The Sun ALM-2 Asynchronous Line Multiplexer provides 16 asynchronous serial communication lines with modem control and one Centronics-compatible parallel printer port.
Each serial line behaves as described in tty(4). Input and output for each line may independently be set to run at any of 16 speeds; see tty(4) for the encoding.
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 cause line ttyh2 to be treated in this way.
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 0−63 correspond directly to the normal tty lines. They are named ttyXY where X represents the physical board as one of the characters h, i, j, or k, 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.)
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) and are (conventionally) named cua∗. The cua lines are special in that they can always be opened with or without a carrier on the line. Once a cua line is opened, the corresponding tty line can not be opened until the cua line is closed. Also, if the tty line has been opened successfully (usually only when carrier is recognized on the modem) the corresponding cua line can not be opened.
This allows a modem to be attached to /dev/ttyh0 (usually renamed to /dev/ttyd0) and used for dialin (by enabling the line for login in /etc/ttys) and also used for dialout (by tip(1C) or uucp(1C)) as /dev/cua0 when no one is logged in on the line. Note that the bit in the flags word in the configuration file (see above) must be zero for this line, which enables hardware carrier detection.
FILES
/dev/mcpp[0-3]parallel printer port
/dev/tty[h-k][0-9a-f]hardwired tty lines
/dev/ttyd[0-9a-f]dialin tty lines
/dev/cua[0-9a-f]dialout tty lines
SEE ALSO
DIAGNOSTICS
Most of these diagnostics “should never happen;” their occurrence usually indicates problems elsewhere in the system as well.
mcpn: 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.
Sun Release 3.2 — Last change: 27 May 1987