Correct BSD License clause numbering from 1-2-4 to 1-2-3.
[dragonfly.git] / share / man / man4 / man4.i386 / cy.4
1 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" the Systems Programming Group of the University of Utah Computer
6 .\" Science Department.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\"     from: @(#)dca.4 5.2 (Berkeley) 3/27/91
32 .\"     from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
33 .\"     from: sio.4,v 1.16 1995/06/26 06:05:30 bde Exp $
34 .\" $FreeBSD: src/share/man/man4/man4.i386/cy.4,v 1.13.2.2 2001/08/17 13:08:45 ru Exp $
35 .\"
36 .Dd June 14, 1999
37 .Dt CY 4 i386
38 .Os
39 .Sh NAME
40 .Nm cy
41 .Nd Cyclades Cyclom-Y serial driver
42 .Sh SYNOPSIS
43 .Cd "device cy"
44 .Pp
45 Minor numbering:
46 .Bd -literal
47 0b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR
48                           call\fBO\fRut
49                            \fBL\fRock
50                             \fBI\fRnitial
51   \fBMMMMMMMMMMMMMMMM           MMMMMM\fRinor
52 .Ed
53 .Sh DESCRIPTION
54 The
55 .Nm
56 driver provides support for Cirrus Logic CD1400-based
57 .Tn EIA
58 .Tn RS-232C
59 .Pf ( Tn CCITT
60 .Tn V.24 )
61 communications interfaces (ports) on Cyclades Cyclom-Y boards.
62 Each CD1400 provides 4 ports.
63 Cyclom-Y boards with various numbers of CD1400's are available.
64 This driver supports up to 8 CD1400's (32 ports) per board.
65 .Pp
66 Input and output for each line may set independently
67 to the following speeds:
68 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
69 19200, 38400, 57600, or 115200 bps.
70 Other speeds of up to 150000 are supported by the termios interface
71 but not by the sgttyb compatibility interface.
72 The CD1400 is not fast enough to handle speeds above 115200 bps
73 effectively.
74 It can transmit on a single line at slightly more than 115200 bps,
75 but when 4 lines are active in both directions its limit is about
76 90000 bps on each line.
77 .\" XXX the following should be true for all serial drivers and
78 .\" should not be repeated in the man pages for all serial drivers.
79 .\" It was copied from sio.4.  The only change was s/sio/cy/g.
80 .Pp
81 Serial ports controlled by the
82 .Nm
83 driver can be used for both `callin' and `callout'.
84 For each port there is a callin device and a callout device.
85 The minor number of the callout device is 128 higher
86 than that of the corresponding callin port.
87 The callin device is general purpose.
88 Processes opening it normally wait for carrier
89 and for the callout device to become inactive.
90 The callout device is used to steal the port from
91 processes waiting for carrier on the callin device.
92 Processes opening it do not wait for carrier
93 and put any processes waiting for carrier on the callin device into
94 a deeper sleep so that they do not conflict with the callout session.
95 The callout device is abused for handling programs that are supposed
96 to work on general ports and need to open the port without waiting
97 but are too stupid to do so.
98 .Pp
99 The
100 .Nm
101 driver also supports an initial-state and a lock-state control
102 device for each of the callin and the callout "data" devices.
103 The minor number of the initial-state device is 32 higher
104 than that of the corresponding data device.
105 The minor number of the lock-state device is 64 higher
106 than that of the corresponding data device.
107 The termios settings of a data device are copied
108 from those of the corresponding initial-state device
109 on first opens and are not inherited from previous opens.
110 Use
111 .Xr stty 1
112 in the normal way on the initial-state devices to program
113 initial termios states suitable for your setup.
114 .Pp
115 The lock termios state acts as flags to disable changing
116 the termios state.  E.g., to lock a flag variable such as
117 CRTSCTS, use
118 .Em "stty crtscts"
119 on the lock-state device.  Speeds and special characters
120 may be locked by setting the corresponding value in the lock-state
121 device to any nonzero value.
122 .Pp
123 Correct programs talking to correctly wired external devices
124 work with almost arbitrary initial states and almost no locking,
125 but other setups may benefit from changing some of the default
126 initial state and locking the state.
127 In particular, the initial states for non (POSIX) standard flags
128 should be set to suit the devices attached and may need to be
129 locked to prevent buggy programs from changing them.
130 E.g., CRTSCTS should be locked on for devices that support
131 RTS/CTS handshaking at all times and off for devices that don't
132 support it at all.  CLOCAL should be locked on for devices
133 that don't support carrier.  HUPCL may be locked off if you don't
134 want to hang up for some reason.  In general, very bad things happen
135 if something is locked to the wrong state, and things should not
136 be locked for devices that support more than one setting.  The
137 CLOCAL flag on callin ports should be locked off for logins
138 to avoid certain security holes, but this needs to be done by
139 getty if the callin port is used for anything else.
140 .Sh FILES
141 .\" XXX more cloning: s/d/c/g and add a ? for the card number.
142 .Bl -tag -width /dev/ttyic?? -compact
143 .It Pa /dev/ttyc??
144 for callin ports
145 .It Pa /dev/ttyic??
146 .It Pa /dev/ttylc??
147 corresponding callin initial-state and lock-state devices
148 .Pp
149 .\" XXX more cloning: s/a/c/g.  No consistency :-(.
150 .It Pa /dev/cuac??
151 for callout ports
152 .It Pa /dev/cuaic??
153 .It Pa /dev/cualc??
154 corresponding callout initial-state and lock-state devices
155 .El
156 .Pp
157 .Bl -tag -width /etc/rc.d/serial -compact
158 .It Pa /etc/rc.d/serial
159 examples of setting the initial-state and lock-state devices
160 .El
161 .Pp
162 The first question mark in these device names is short for the
163 card number
164 (a decimal number between 0 and 65535 inclusive).
165 The second question mark is short for the port number
166 (a letter in the range [0-9a-v]).
167 .Sh DIAGNOSTICS
168 .Bl -diag
169 .\" XXX back to s/sio/cy/g.
170 .It cy%d: silo overflow.
171 Problem in the interrupt handler.
172 .El
173 .Bl -diag
174 .It cy%d: interrupt-level buffer overflow.
175 Problem in the bottom half of the driver.
176 .El
177 .Bl -diag
178 .It cy%d: tty-level buffer overflow.
179 Problem in the application.
180 Input has arrived faster than the given module could process it
181 and some has been lost.
182 .El
183 .\" .Bl -diag
184 .\" .It sio%d: reduced fifo trigger level to %d.
185 .\" Attempting to avoid further silo overflows.
186 .\" .El
187 .Sh SEE ALSO
188 .Xr stty 1 ,
189 .Xr termios 4 ,
190 .Xr tty 4 ,
191 .Xr comcontrol 8 ,
192 .Xr pstat 8
193 .Sh HISTORY
194 The
195 .Nm
196 driver is derived from the
197 .Nm sio
198 driver and the
199 .Nx
200 .Nm
201 driver and is
202 .Ud
203 .Sh BUGS
204 Serial consoles are not implemented.