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