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