1995-10-10 09:34:21 +00:00
|
|
|
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
|
|
.\" the Systems Programming Group of the University of Utah Computer
|
|
|
|
.\" Science Department.
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
|
|
|
|
.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
|
|
|
|
.\" from: sio.4,v 1.16 1995/06/26 06:05:30 bde Exp $
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1995-10-10 09:34:21 +00:00
|
|
|
.\"
|
2004-05-23 15:22:53 +00:00
|
|
|
.Dd May 24, 2004
|
2004-05-23 16:27:40 +00:00
|
|
|
.Dt CY 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm cy
|
1997-03-03 18:38:37 +00:00
|
|
|
.Nd Cyclades Cyclom-Y serial driver
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh SYNOPSIS
|
2004-05-23 15:22:53 +00:00
|
|
|
For one ISA card:
|
2002-08-15 08:20:07 +00:00
|
|
|
.Bd -ragged -offset indent -compact
|
2004-05-23 15:22:53 +00:00
|
|
|
.Cd "device cy"
|
2002-08-15 08:20:07 +00:00
|
|
|
.Pp
|
2004-05-23 15:22:53 +00:00
|
|
|
In
|
2001-10-13 09:08:37 +00:00
|
|
|
.Pa /boot/device.hints :
|
|
|
|
.Cd hint.cy.0.at="isa"
|
|
|
|
.Cd hint.cy.0.irq="10"
|
|
|
|
.Cd hint.cy.0.maddr="0xd4000"
|
|
|
|
.Cd hint.cy.0.msize="0x2000"
|
2002-08-15 08:20:07 +00:00
|
|
|
.Ed
|
2001-10-13 09:08:37 +00:00
|
|
|
.Pp
|
2004-05-23 15:22:53 +00:00
|
|
|
For two ISA cards:
|
2002-08-15 08:20:07 +00:00
|
|
|
.Bd -ragged -offset indent -compact
|
2004-05-23 15:22:53 +00:00
|
|
|
.Cd "device cy"
|
2002-08-15 08:20:07 +00:00
|
|
|
.Pp
|
2004-05-23 15:22:53 +00:00
|
|
|
In
|
2002-07-11 20:24:58 +00:00
|
|
|
.Pa /boot/device.hints :
|
2001-10-13 09:08:37 +00:00
|
|
|
.Cd hint.cy.0.at="isa"
|
|
|
|
.Cd hint.cy.0.irq="10"
|
|
|
|
.Cd hint.cy.0.maddr="0xd4000"
|
|
|
|
.Cd hint.cy.0.msize="0x2000"
|
|
|
|
.Cd hint.cy.1.at="isa"
|
|
|
|
.Cd hint.cy.1.irq="11"
|
|
|
|
.Cd hint.cy.1.maddr="0xd6000"
|
|
|
|
.Cd hint.cy.1.msize="0x2000"
|
2002-08-15 08:20:07 +00:00
|
|
|
.Ed
|
1997-01-31 00:38:18 +00:00
|
|
|
.Pp
|
2004-05-23 15:22:53 +00:00
|
|
|
For PCI cards:
|
|
|
|
.Bd -ragged -offset indent -compact
|
2004-05-23 16:15:25 +00:00
|
|
|
.Cd "device cy"
|
2004-05-23 15:22:53 +00:00
|
|
|
.Cd "options CY_PCI_FASTINTR"
|
|
|
|
.Pp
|
|
|
|
No lines are required in
|
|
|
|
.Pa /boot/device.hints
|
|
|
|
for PCI cards.
|
|
|
|
.Ed
|
|
|
|
.Pp
|
1995-10-10 09:34:21 +00:00
|
|
|
Minor numbering:
|
2002-08-15 08:20:07 +00:00
|
|
|
.Bd -literal -offset indent -compact
|
1997-03-03 18:38:37 +00:00
|
|
|
0b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR
|
|
|
|
call\fBO\fRut
|
|
|
|
\fBL\fRock
|
|
|
|
\fBI\fRnitial
|
|
|
|
\fBMMMMMMMMMMMMMMMM MMMMMM\fRinor
|
1997-01-31 00:38:18 +00:00
|
|
|
.Ed
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1997-03-03 18:38:37 +00:00
|
|
|
driver provides support for Cirrus Logic CD1400-based
|
1995-10-10 09:34:21 +00:00
|
|
|
.Tn EIA
|
|
|
|
.Tn RS-232C
|
|
|
|
.Pf ( Tn CCITT
|
|
|
|
.Tn V.24 )
|
|
|
|
communications interfaces (ports) on Cyclades Cyclom-Y boards.
|
|
|
|
Each CD1400 provides 4 ports.
|
1997-03-03 18:38:37 +00:00
|
|
|
Cyclom-Y boards with various numbers of CD1400's are available.
|
|
|
|
This driver supports up to 8 CD1400's (32 ports) per board.
|
1995-10-10 09:34:21 +00:00
|
|
|
.Pp
|
|
|
|
Input and output for each line may set independently
|
|
|
|
to the following speeds:
|
|
|
|
50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
|
|
|
|
19200, 38400, 57600, or 115200 bps.
|
|
|
|
Other speeds of up to 150000 are supported by the termios interface
|
|
|
|
but not by the sgttyb compatibility interface.
|
|
|
|
The CD1400 is not fast enough to handle speeds above 115200 bps
|
|
|
|
effectively.
|
|
|
|
It can transmit on a single line at slightly more than 115200 bps,
|
|
|
|
but when 4 lines are active in both directions its limit is about
|
|
|
|
90000 bps on each line.
|
|
|
|
.\" XXX the following should be true for all serial drivers and
|
|
|
|
.\" should not be repeated in the man pages for all serial drivers.
|
|
|
|
.\" It was copied from sio.4. The only change was s/sio/cy/g.
|
|
|
|
.Pp
|
|
|
|
Serial ports controlled by the
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1995-10-10 09:34:21 +00:00
|
|
|
driver can be used for both `callin' and `callout'.
|
|
|
|
For each port there is a callin device and a callout device.
|
|
|
|
The minor number of the callout device is 128 higher
|
|
|
|
than that of the corresponding callin port.
|
|
|
|
The callin device is general purpose.
|
|
|
|
Processes opening it normally wait for carrier
|
|
|
|
and for the callout device to become inactive.
|
|
|
|
The callout device is used to steal the port from
|
|
|
|
processes waiting for carrier on the callin device.
|
|
|
|
Processes opening it do not wait for carrier
|
|
|
|
and put any processes waiting for carrier on the callin device into
|
|
|
|
a deeper sleep so that they do not conflict with the callout session.
|
|
|
|
The callout device is abused for handling programs that are supposed
|
|
|
|
to work on general ports and need to open the port without waiting
|
|
|
|
but are too stupid to do so.
|
|
|
|
.Pp
|
|
|
|
The
|
2000-11-20 18:41:33 +00:00
|
|
|
.Nm
|
1995-10-10 09:34:21 +00:00
|
|
|
driver also supports an initial-state and a lock-state control
|
|
|
|
device for each of the callin and the callout "data" devices.
|
|
|
|
The minor number of the initial-state device is 32 higher
|
|
|
|
than that of the corresponding data device.
|
|
|
|
The minor number of the lock-state device is 64 higher
|
|
|
|
than that of the corresponding data device.
|
|
|
|
The termios settings of a data device are copied
|
|
|
|
from those of the corresponding initial-state device
|
|
|
|
on first opens and are not inherited from previous opens.
|
|
|
|
Use
|
|
|
|
.Xr stty 1
|
|
|
|
in the normal way on the initial-state devices to program
|
|
|
|
initial termios states suitable for your setup.
|
1997-01-31 00:38:18 +00:00
|
|
|
.Pp
|
1995-10-10 09:34:21 +00:00
|
|
|
The lock termios state acts as flags to disable changing
|
2004-07-03 18:29:24 +00:00
|
|
|
the termios state.
|
|
|
|
E.g., to lock a flag variable such as
|
1995-10-10 09:34:21 +00:00
|
|
|
CRTSCTS, use
|
1997-02-05 15:07:37 +00:00
|
|
|
.Em "stty crtscts"
|
2004-07-03 18:29:24 +00:00
|
|
|
on the lock-state device.
|
|
|
|
Speeds and special characters
|
1995-10-10 09:34:21 +00:00
|
|
|
may be locked by setting the corresponding value in the lock-state
|
|
|
|
device to any nonzero value.
|
1997-01-31 00:38:18 +00:00
|
|
|
.Pp
|
1995-10-10 09:34:21 +00:00
|
|
|
Correct programs talking to correctly wired external devices
|
|
|
|
work with almost arbitrary initial states and almost no locking,
|
|
|
|
but other setups may benefit from changing some of the default
|
|
|
|
initial state and locking the state.
|
|
|
|
In particular, the initial states for non (POSIX) standard flags
|
|
|
|
should be set to suit the devices attached and may need to be
|
|
|
|
locked to prevent buggy programs from changing them.
|
|
|
|
E.g., CRTSCTS should be locked on for devices that support
|
2005-02-13 22:25:33 +00:00
|
|
|
RTS/CTS handshaking at all times and off for devices that do not
|
2004-07-03 18:29:24 +00:00
|
|
|
support it at all.
|
|
|
|
CLOCAL should be locked on for devices
|
2005-02-13 22:25:33 +00:00
|
|
|
that do not support carrier.
|
|
|
|
HUPCL may be locked off if you do not
|
2004-07-03 18:29:24 +00:00
|
|
|
want to hang up for some reason.
|
|
|
|
In general, very bad things happen
|
1995-10-10 09:34:21 +00:00
|
|
|
if something is locked to the wrong state, and things should not
|
2004-07-03 18:29:24 +00:00
|
|
|
be locked for devices that support more than one setting.
|
|
|
|
The
|
1995-10-10 09:34:21 +00:00
|
|
|
CLOCAL flag on callin ports should be locked off for logins
|
|
|
|
to avoid certain security holes, but this needs to be done by
|
|
|
|
getty if the callin port is used for anything else.
|
1999-06-14 15:10:35 +00:00
|
|
|
.Ss Kernel Configuration Options
|
|
|
|
The
|
|
|
|
.Em CY_PCI_FASTINTR
|
|
|
|
option should be used to avoid suboptimal interrupt handling for
|
|
|
|
PCI Cyclades boards.
|
|
|
|
The PCI BIOS must be configured with the
|
|
|
|
.Nm
|
|
|
|
interrupt not shared with any other active device
|
|
|
|
for this option to work.
|
|
|
|
This option is not the default because it is currently harmful in
|
|
|
|
certain cases where it does not work.
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh FILES
|
1997-03-03 18:38:37 +00:00
|
|
|
.\" XXX more cloning: s/d/c/g and add a ? for the card number.
|
|
|
|
.Bl -tag -width /dev/ttyic?? -compact
|
|
|
|
.It Pa /dev/ttyc??
|
1995-10-10 09:34:21 +00:00
|
|
|
for callin ports
|
1997-03-03 18:38:37 +00:00
|
|
|
.It Pa /dev/ttyic??
|
|
|
|
.It Pa /dev/ttylc??
|
1995-10-10 09:34:21 +00:00
|
|
|
corresponding callin initial-state and lock-state devices
|
1997-01-31 00:38:18 +00:00
|
|
|
.Pp
|
1995-10-10 09:34:21 +00:00
|
|
|
.\" XXX more cloning: s/a/c/g. No consistency :-(.
|
1997-03-03 18:38:37 +00:00
|
|
|
.It Pa /dev/cuac??
|
1995-10-10 09:34:21 +00:00
|
|
|
for callout ports
|
1997-03-03 18:38:37 +00:00
|
|
|
.It Pa /dev/cuaic??
|
|
|
|
.It Pa /dev/cualc??
|
1995-10-10 09:34:21 +00:00
|
|
|
corresponding callout initial-state and lock-state devices
|
|
|
|
.El
|
1997-01-31 00:38:18 +00:00
|
|
|
.Pp
|
1995-10-10 09:34:21 +00:00
|
|
|
.Bl -tag -width /etc/rc.serial -compact
|
|
|
|
.It Pa /etc/rc.serial
|
|
|
|
examples of setting the initial-state and lock-state devices
|
|
|
|
.El
|
|
|
|
.Pp
|
1997-03-03 18:38:37 +00:00
|
|
|
The first question mark in these device names is short for the
|
|
|
|
card number
|
|
|
|
(a decimal number between 0 and 65535 inclusive).
|
|
|
|
The second question mark is short for the port number
|
|
|
|
(a letter in the range [0-9a-v]).
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
.Bl -diag
|
|
|
|
.\" XXX back to s/sio/cy/g.
|
|
|
|
.It cy%d: silo overflow.
|
|
|
|
Problem in the interrupt handler.
|
|
|
|
.El
|
|
|
|
.Bl -diag
|
|
|
|
.It cy%d: interrupt-level buffer overflow.
|
|
|
|
Problem in the bottom half of the driver.
|
|
|
|
.El
|
|
|
|
.Bl -diag
|
|
|
|
.It cy%d: tty-level buffer overflow.
|
|
|
|
Problem in the application.
|
|
|
|
Input has arrived faster than the given module could process it
|
|
|
|
and some has been lost.
|
|
|
|
.El
|
|
|
|
.\" .Bl -diag
|
|
|
|
.\" .It sio%d: reduced fifo trigger level to %d.
|
|
|
|
.\" Attempting to avoid further silo overflows.
|
|
|
|
.\" .El
|
|
|
|
.Sh SEE ALSO
|
1996-12-26 16:16:37 +00:00
|
|
|
.Xr stty 1 ,
|
1995-10-10 09:34:21 +00:00
|
|
|
.Xr termios 4 ,
|
1996-12-26 16:16:37 +00:00
|
|
|
.Xr tty 4 ,
|
1997-03-03 18:38:37 +00:00
|
|
|
.Xr comcontrol 8 ,
|
|
|
|
.Xr pstat 8
|
1995-10-10 09:34:21 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver is derived from the
|
|
|
|
.Nm sio
|
2001-08-13 17:00:36 +00:00
|
|
|
driver and the
|
|
|
|
.Nx
|
1995-10-10 09:34:21 +00:00
|
|
|
.Nm
|
|
|
|
driver and is
|
|
|
|
.Ud
|
|
|
|
.Sh BUGS
|
|
|
|
Serial consoles are not implemented.
|