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