PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/share/man/man4/cy.4

https://bitbucket.org/freebsd/freebsd-head/
Forth | 261 lines | 260 code | 0 blank | 1 comment | 31 complexity | 94c1ebd69bb9b8d95c8fd7087693a091 MD5 | raw file
  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
 47For one ISA card:
 48.Bd -ragged -offset indent -compact
 49.Cd "device cy"
 50.Pp
 51In
 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
 59For two ISA cards:
 60.Bd -ragged -offset indent -compact
 61.Cd "device cy"
 62.Pp
 63In
 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
 75For PCI cards:
 76.Bd -ragged -offset indent -compact
 77.Cd "device cy"
 78.Cd "options CY_PCI_FASTINTR"
 79.Pp
 80No lines are required in
 81.Pa /boot/device.hints
 82for PCI cards.
 83.Ed
 84.Pp
 85Minor numbering:
 86.Bd -literal -offset indent -compact
 870b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR
 88                          call\fBO\fRut
 89                           \fBL\fRock
 90                            \fBI\fRnitial
 91  \fBMMMMMMMMMMMMMMMM           MMMMMM\fRinor
 92.Ed
 93.Sh DESCRIPTION
 94The
 95.Nm
 96driver provides support for Cirrus Logic CD1400-based
 97.Tn EIA
 98.Tn RS-232C
 99.Pf ( Tn CCITT
100.Tn V.24 )
101communications interfaces (ports) on Cyclades Cyclom-Y boards.
102Each CD1400 provides 4 ports.
103Cyclom-Y boards with various numbers of CD1400's are available.
104This driver supports up to 8 CD1400's (32 ports) per board.
105.Pp
106Input and output for each line may set independently
107to the following speeds:
10850, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
10919200, 38400, 57600, or 115200 bps.
110Other speeds of up to 150000 are supported by the termios interface
111but not by the sgttyb compatibility interface.
112The CD1400 is not fast enough to handle speeds above 115200 bps
113effectively.
114It can transmit on a single line at slightly more than 115200 bps,
115but when 4 lines are active in both directions its limit is about
11690000 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
121Serial ports controlled by the
122.Nm
123driver can be used for both `callin' and `callout'.
124For each port there is a callin device and a callout device.
125The minor number of the callout device is 128 higher
126than that of the corresponding callin port.
127The callin device is general purpose.
128Processes opening it normally wait for carrier
129and for the callout device to become inactive.
130The callout device is used to steal the port from
131processes waiting for carrier on the callin device.
132Processes opening it do not wait for carrier
133and put any processes waiting for carrier on the callin device into
134a deeper sleep so that they do not conflict with the callout session.
135The callout device is abused for handling programs that are supposed
136to work on general ports and need to open the port without waiting
137but are too stupid to do so.
138.Pp
139The
140.Nm
141driver also supports an initial-state and a lock-state control
142device for each of the callin and the callout "data" devices.
143The minor number of the initial-state device is 32 higher
144than that of the corresponding data device.
145The minor number of the lock-state device is 64 higher
146than that of the corresponding data device.
147The termios settings of a data device are copied
148from those of the corresponding initial-state device
149on first opens and are not inherited from previous opens.
150Use
151.Xr stty 1
152in the normal way on the initial-state devices to program
153initial termios states suitable for your setup.
154.Pp
155The lock termios state acts as flags to disable changing
156the termios state.
157E.g., to lock a flag variable such as
158CRTSCTS, use
159.Em "stty crtscts"
160on the lock-state device.
161Speeds and special characters
162may be locked by setting the corresponding value in the lock-state
163device to any nonzero value.
164.Pp
165Correct programs talking to correctly wired external devices
166work with almost arbitrary initial states and almost no locking,
167but other setups may benefit from changing some of the default
168initial state and locking the state.
169In particular, the initial states for non (POSIX) standard flags
170should be set to suit the devices attached and may need to be
171locked to prevent buggy programs from changing them.
172E.g., CRTSCTS should be locked on for devices that support
173RTS/CTS handshaking at all times and off for devices that do not
174support it at all.
175CLOCAL should be locked on for devices
176that do not support carrier.
177HUPCL may be locked off if you do not
178want to hang up for some reason.
179In general, very bad things happen
180if something is locked to the wrong state, and things should not
181be locked for devices that support more than one setting.
182The
183CLOCAL flag on callin ports should be locked off for logins
184to avoid certain security holes, but this needs to be done by
185getty if the callin port is used for anything else.
186.Ss Kernel Configuration Options
187The
188.Em CY_PCI_FASTINTR
189option should be used to avoid suboptimal interrupt handling for
190PCI Cyclades boards.
191The PCI BIOS must be configured with the
192.Nm
193interrupt not shared with any other active device
194for this option to work.
195This option is not the default because it is currently harmful in
196certain 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??
201for callin ports
202.It Pa /dev/ttyic??
203.It Pa /dev/ttylc??
204corresponding callin initial-state and lock-state devices
205.Pp
206.\" XXX more cloning: s/a/c/g.  No consistency :-(.
207.It Pa /dev/cuac??
208for callout ports
209.It Pa /dev/cuaic??
210.It Pa /dev/cualc??
211corresponding 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
216examples of setting the initial-state and lock-state devices
217.El
218.Pp
219The first question mark in these device names is short for the
220card number
221(a decimal number between 0 and 65535 inclusive).
222The 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.
228Problem in the interrupt handler.
229.El
230.Bl -diag
231.It cy%d: interrupt-level buffer overflow.
232Problem in the bottom half of the driver.
233.El
234.Bl -diag
235.It cy%d: tty-level buffer overflow.
236Problem in the application.
237Input has arrived faster than the given module could process it
238and 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
251The
252.Nm
253driver is derived from the
254.Nm sio
255driver and the
256.Nx
257.Nm
258driver and is
259.Ud
260.Sh BUGS
261Serial consoles are not implemented.