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