]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/cy.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / 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$
39 .\"
40 .Dd May 24, 2004
41 .Dt CY 4
42 .Os
43 .Sh NAME
44 .Nm cy
45 .Nd Cyclades Cyclom-Y serial driver
46 .Sh SYNOPSIS
47 .Pp
48 For one ISA card:
49 .Bd -ragged -offset indent -compact
50 .Cd "device cy"
51 .Pp
52 In
53 .Pa /boot/device.hints :
54 .Cd hint.cy.0.at="isa"
55 .Cd hint.cy.0.irq="10"
56 .Cd hint.cy.0.maddr="0xd4000"
57 .Cd hint.cy.0.msize="0x2000"
58 .Ed
59 .Pp
60 For two ISA cards:
61 .Bd -ragged -offset indent -compact
62 .Cd "device cy"
63 .Pp
64 In
65 .Pa /boot/device.hints :
66 .Cd hint.cy.0.at="isa"
67 .Cd hint.cy.0.irq="10"
68 .Cd hint.cy.0.maddr="0xd4000"
69 .Cd hint.cy.0.msize="0x2000"
70 .Cd hint.cy.1.at="isa"
71 .Cd hint.cy.1.irq="11"
72 .Cd hint.cy.1.maddr="0xd6000"
73 .Cd hint.cy.1.msize="0x2000"
74 .Ed
75 .Pp
76 For PCI cards:
77 .Bd -ragged -offset indent -compact
78 .Cd "device cy"
79 .Cd "options CY_PCI_FASTINTR"
80 .Pp
81 No lines are required in
82 .Pa /boot/device.hints
83 for PCI cards.
84 .Ed
85 .Pp
86 Minor numbering:
87 .Bd -literal -offset indent -compact
88 0b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR
89                           call\fBO\fRut
90                            \fBL\fRock
91                             \fBI\fRnitial
92   \fBMMMMMMMMMMMMMMMM           MMMMMM\fRinor
93 .Ed
94 .Sh DESCRIPTION
95 The
96 .Nm
97 driver provides support for Cirrus Logic CD1400-based
98 .Tn EIA
99 .Tn RS-232C
100 .Pf ( Tn CCITT
101 .Tn V.24 )
102 communications interfaces (ports) on Cyclades Cyclom-Y boards.
103 Each CD1400 provides 4 ports.
104 Cyclom-Y boards with various numbers of CD1400's are available.
105 This driver supports up to 8 CD1400's (32 ports) per board.
106 .Pp
107 Input and output for each line may set independently
108 to the following speeds:
109 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
110 19200, 38400, 57600, or 115200 bps.
111 Other speeds of up to 150000 are supported by the termios interface
112 but not by the sgttyb compatibility interface.
113 The CD1400 is not fast enough to handle speeds above 115200 bps
114 effectively.
115 It can transmit on a single line at slightly more than 115200 bps,
116 but when 4 lines are active in both directions its limit is about
117 90000 bps on each line.
118 .\" XXX the following should be true for all serial drivers and
119 .\" should not be repeated in the man pages for all serial drivers.
120 .\" It was copied from sio.4.  The only change was s/sio/cy/g.
121 .Pp
122 Serial ports controlled by the
123 .Nm
124 driver can be used for both `callin' and `callout'.
125 For each port there is a callin device and a callout device.
126 The minor number of the callout device is 128 higher
127 than that of the corresponding callin port.
128 The callin device is general purpose.
129 Processes opening it normally wait for carrier
130 and for the callout device to become inactive.
131 The callout device is used to steal the port from
132 processes waiting for carrier on the callin device.
133 Processes opening it do not wait for carrier
134 and put any processes waiting for carrier on the callin device into
135 a deeper sleep so that they do not conflict with the callout session.
136 The callout device is abused for handling programs that are supposed
137 to work on general ports and need to open the port without waiting
138 but are too stupid to do so.
139 .Pp
140 The
141 .Nm
142 driver also supports an initial-state and a lock-state control
143 device for each of the callin and the callout "data" devices.
144 The minor number of the initial-state device is 32 higher
145 than that of the corresponding data device.
146 The minor number of the lock-state device is 64 higher
147 than that of the corresponding data device.
148 The termios settings of a data device are copied
149 from those of the corresponding initial-state device
150 on first opens and are not inherited from previous opens.
151 Use
152 .Xr stty 1
153 in the normal way on the initial-state devices to program
154 initial termios states suitable for your setup.
155 .Pp
156 The lock termios state acts as flags to disable changing
157 the termios state.
158 E.g., to lock a flag variable such as
159 CRTSCTS, use
160 .Em "stty crtscts"
161 on the lock-state device.
162 Speeds and special characters
163 may be locked by setting the corresponding value in the lock-state
164 device to any nonzero value.
165 .Pp
166 Correct programs talking to correctly wired external devices
167 work with almost arbitrary initial states and almost no locking,
168 but other setups may benefit from changing some of the default
169 initial state and locking the state.
170 In particular, the initial states for non (POSIX) standard flags
171 should be set to suit the devices attached and may need to be
172 locked to prevent buggy programs from changing them.
173 E.g., CRTSCTS should be locked on for devices that support
174 RTS/CTS handshaking at all times and off for devices that do not
175 support it at all.
176 CLOCAL should be locked on for devices
177 that do not support carrier.
178 HUPCL may be locked off if you do not
179 want to hang up for some reason.
180 In general, very bad things happen
181 if something is locked to the wrong state, and things should not
182 be locked for devices that support more than one setting.
183 The
184 CLOCAL flag on callin ports should be locked off for logins
185 to avoid certain security holes, but this needs to be done by
186 getty if the callin port is used for anything else.
187 .Ss Kernel Configuration Options
188 The
189 .Em CY_PCI_FASTINTR
190 option should be used to avoid suboptimal interrupt handling for
191 PCI Cyclades boards.
192 The PCI BIOS must be configured with the
193 .Nm
194 interrupt not shared with any other active device
195 for this option to work.
196 This option is not the default because it is currently harmful in
197 certain cases where it does not work.
198 .Sh FILES
199 .\" XXX more cloning: s/d/c/g and add a ? for the card number.
200 .Bl -tag -width /dev/ttyic?? -compact
201 .It Pa /dev/ttyc??
202 for callin ports
203 .It Pa /dev/ttyic??
204 .It Pa /dev/ttylc??
205 corresponding callin initial-state and lock-state devices
206 .Pp
207 .\" XXX more cloning: s/a/c/g.  No consistency :-(.
208 .It Pa /dev/cuac??
209 for callout ports
210 .It Pa /dev/cuaic??
211 .It Pa /dev/cualc??
212 corresponding callout initial-state and lock-state devices
213 .El
214 .Pp
215 .Bl -tag -width /etc/rc.serial -compact
216 .It Pa /etc/rc.serial
217 examples of setting the initial-state and lock-state devices
218 .El
219 .Pp
220 The first question mark in these device names is short for the
221 card number
222 (a decimal number between 0 and 65535 inclusive).
223 The second question mark is short for the port number
224 (a letter in the range [0-9a-v]).
225 .Sh DIAGNOSTICS
226 .Bl -diag
227 .\" XXX back to s/sio/cy/g.
228 .It cy%d: silo overflow.
229 Problem in the interrupt handler.
230 .El
231 .Bl -diag
232 .It cy%d: interrupt-level buffer overflow.
233 Problem in the bottom half of the driver.
234 .El
235 .Bl -diag
236 .It cy%d: tty-level buffer overflow.
237 Problem in the application.
238 Input has arrived faster than the given module could process it
239 and some has been lost.
240 .El
241 .\" .Bl -diag
242 .\" .It sio%d: reduced fifo trigger level to %d.
243 .\" Attempting to avoid further silo overflows.
244 .\" .El
245 .Sh SEE ALSO
246 .Xr stty 1 ,
247 .Xr termios 4 ,
248 .Xr tty 4 ,
249 .Xr comcontrol 8 ,
250 .Xr pstat 8
251 .Sh HISTORY
252 The
253 .Nm
254 driver is derived from the
255 .Nm sio
256 driver and the
257 .Nx
258 .Nm
259 driver and is
260 .Ud
261 .Sh BUGS
262 Serial consoles are not implemented.