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