1.\" Copyright (c) 2003 Roman Kurakin <rik@cronyx.ru> 2.\" Copyright (c) 2003 Cronyx Engineering 3.\" All rights reserved. |
4.\"
|
2.\" $FreeBSD: head/share/man/man4/man4.i386/cx.4 115143 2003-05-18 21:05:22Z ru $
|
5.\" This software is distributed with NO WARRANTIES, not even the implied 6.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
7.\"
|
4.Dd December 12, 1994
5.Dt CX 4 i386
|
8.\" Authors grant any other persons or organisations a permission to use, 9.\" modify and redistribute this software in source and binary forms, 10.\" as long as this message is kept with the software, all derivative 11.\" works or modified versions. 12.\" 13.\" Cronyx Id: cp.4,v 1.1.2.2 2003/09/11 14:56:50 rik Exp $ 14.\" $FreeBSD: head/share/man/man4/man4.i386/cx.4 123159 2003-12-05 07:03:58Z imp $ 15.\" 16.Dd November 27, 2003 17.Dt Cronyx-Sigma 4 |
18.Os 19.Sh NAME 20.Nm cx
|
9.Nd asynchronous/synchronous Cronyx-Sigma adapter driver
|
21.Nd driver for synchronous/asynchronous Cronyx-Sigma WAN adapters |
22.Sh SYNOPSIS
|
11.Cd "device cx 1"
12.Cd device sppp
|
23.Cd "device cx" |
24.Pp
|
25Additional options: 26.Cd "device sppp" 27.Cd "options NETGRAPH" 28.Cd "options NETGRAPH_CRONYX" 29.Pp |
30In 31.Pa /boot/device.hints : 32.Cd hint.cx.0.at="isa" 33.Cd hint.cx.0.port="0x240" 34.Cd hint.cx.0.irq="15" 35.Cd hint.cx.0.drq="7"
|
36.Sh DESCRIPTION 37The 38.Nm 39driver needs either 40.Xr sppp 4 41or 42.Xr netgraph 4 . 43Which one to use is determined by NETGRAPH_CRONYX option. 44If this option is present in your kernel configuration file, the 45.Nm 46driver will be compiled with 47.Xr netgraph 4 48support, else driver will be compiled with 49.Xr sppp 4 50support. |
51.Pp 52The base i/o port address specified in 53.Pa /boot/device.hints 54must match the port address set by jumpers on the board. 55The DMA i/o channel and interrupt request numbers are configured
|
25by software at adapter initialization. Legal values are:
|
56by software at adapter initialization. 57Legal values are: |
58.Pp
|
27.Bl -tag -compact -width Port
28.It Port
|
59.Bl -tag -compact -width Port: 60.It Port : |
610x240, 0x260, 0x280, 0x300, 0x320, 0x380
|
30.It IRQ
|
62.It IRQ : |
633, 5, 7, 10, 11, 12, 15
|
32.It DMA
|
64.It DMA : |
655, 6, 7 66.El
|
35.Sh DESCRIPTION
36The Cronyx-Sigma driver supports the adapters of models 100,
37400, 500, 401, 404, 410, 440, 703, 801, 810, 840. Different models have
38different set of channels:
|
67.Pp
|
40.Bl -tag -compact -width Cronyx-Sigma-999
41.It Model
42Channels
43.It Cronyx-Sigma-100
440
45.It Cronyx-Sigma-400
464, 5, 6, 7
47.It Cronyx-Sigma-500
480, 4, 5, 6, 7
49.It Cronyx-Sigma-401
500, 1, 2, 3
51.It Cronyx-Sigma-404
520, 1, 2, 3
53.It Cronyx-Sigma-410
540, 1, 2, 3
55.It Cronyx-Sigma-440
560, 1, 2, 3
57.It Cronyx-Sigma-703
580, 1, 2, 4, 5, 6, 7
59.It Cronyx-Sigma-801
600, 1, 2, 3, 4, 5, 6, 7
61.It Cronyx-Sigma-810
620, 1, 2, 3, 4, 5, 6, 7
63.It Cronyx-Sigma-840
640, 1, 2, 3, 4, 5, 6, 7
65.El
66.Pp
67A pair of two adapters can be united together by the special
68short inter-board cable. Two united adapters use the same
69IRQ and DMA channels and from the point of driver works
70as the single 16-channel multiplexer. One of the united
71boards is ``master'' and the other is ``slave''.
72.Pp
73The channels of the slave united board are numbered by the driver
74beginning with 8, for example, the united adapter of the model 100/500
75has channels 0, 8, 12, 13, 14, 15.
76.Pp
77The channels which have the RS-232 interface can be used
78both in synchronous and asynchronous modes (software selectable
79by cxconfig utility) and hence are called ``universal'' channels.
80.Sh "Asynchronous driver"
81The asynchronous channel device files have the names:
82.Pa /dev/ttyx#
83- for adapter cx0,
84.Pa /dev/ttyy#
85- for adapter cx1,
86.Pa /dev/ttyz#
87- for cx2.
88Here # is the channel number in hexadecimal form, 0-9-a-f.
89.Pp
90The driver fulfills the following standard ioctl requests (see
91.Xr ioctl 2 ) :
92.Pp
93.Bl -tag -width TIOCXXXXX -compact
94.It Dv TIOCSBRK
95Start sending BREAK.
96.It Dv TIOCCBRK
97Stop sending BREAK.
98.It Dv TIOCSDTR
99Set DTR signal (DTR := 1). The DTR signal is always set
100on the first
101.Xr open 2
102and could be changed by
103.Dv TIOCCDTR ,
104.Dv TIOCSDTR ,
105.Dv TIOCMSET ,
106.Dv TIOCMBIS ,
107.Dv TIOCMBIC
108ioctl calls.
109.It TIOCCDTR
110Clear DTR signal (DTR := 0).
111.It TIOCMSET
112Set the given values of DTR and RTS signals (<DTR:RTS> := data).
113The signals DTR and RTS are controlled by
114.Dv TIOCM_DTR
115and
116.Dv TIOCM_RTS
117bits of the data argument of the ioctl system call.
118.It TIOCMBIS
119Set DTR and RTS signals (<DTR:RTS> |= data).
120The signals DTR and RTS are controlled by
121.Dv TIOCM_DTR
122and
123.Dv TIOCM_RTS
124bits of the data argument of the ioctl system call.
125.It TIOCMBIC
126Clear DTR and RTS signals (<DTR:RTS> &= ~data).
127The signals DTR and RTS are controlled by
128.Dv TIOCM_DTR
129and
130.Dv TIOCM_RTS
131bits of the data argument of the ioctl system call.
132.It TIOCMGET
133Determine the state of the modem signals of the line.
134After the call the data argument contains the following bits:
135.Pp
136.Bl -tag -width TIOCM_XXX -compact
137.It TIOCM_LE
138always set (Line Enabled)
139.It TIOCM_DSR
140Data Set Ready signal received
141.It TIOCM_CTS
142Clear To Send signal received
143.It TIOCM_CD
144Data Carrier Detect signal received
145.It TIOCM_DTR
146Data Terminal Ready signal transmitted
147.It TIOCM_RTS
148Request To Send signal transmitted
149.El
150.El
151.Sh "Synchronous driver"
152The synchronous channels and universal channels, turned to the synchronous
153mode by the
154.Xr cxconfig 8
155utility, are accessible as network
156interfaces named ``cx#'' where # is the channel number, 0..47.
157All standard network interface parameters could be set by
158.Xr ifconfig 8
159utility.
|
68The
|
161.Xr cxconfig 8
162command is used to change some extended channel
163options, and also for setting the high-level software protocol
164(e.g. PpP or Cisco HDLC).
|
69.Nm 70driver supports autodetection. 71As for all non-PNP hardware using of 72autodetection could lead to some potential problems with other devices during 73detection of hardware. 74It is alway better to specify hardware resources manualy. |
75.Pp
|
166The universal channels could be used both in asynchronous and synchronous modes.
167By default the asynchronous mode is set.
168The mode could be changed by
169.Xr cxconfig 8
170utility.
171The mode is blocked while the channel is busy (an asynchronous channel
172in open state or the network interface is up).
173.Sh "Synchronous Point-to-Point protocol"
174The Cronyx-Sigma driver uses the built-in implementation of the synchronous
175Point-to-Point protocol (sppp). It includes the support for such
176protocols as PpP/HDLC and Cisco/HDLC, and also the automatic
177connection loss test (via keepalive packets).
178The sppp protocol set is implemented as an independent module
179and could be used by other drivers of synchronous serial channels.
180The version of the driver for BSD/386 (BSDI) operating system
181also supports the usage of the general set of synchronous
182protocols, implemented inside the OS.
183The external protocol set could be selected by ``cxconfig ext'' command
184(see
185.Xr cxconfig 8 ) .
186.Sh "Channel Options Management"
187The
188.Xr cxconfig 8
189utility is used for setting the channels options.
190The channel options are generally set at the start of the operating
191system (for example, from the file
192.Pa /etc/rc ) .
193Note, that not all options have a sense for every particular
194case, and an attempt to set some of them can hang up the channel or
195the whole adapter.
196.Pp
197The actual channel options control functions are implemented via
198the ioctl-s on the special device file /dev/cronyx.
199There are the following ioctl-s available:
200.Pp
201.Bl -tag -width CXIOCXXXXXXX -compact
202.It CXIOCGETMODE
203Get the channel option values.
204.It CXIOCSETMODE
205Set the channel option values.
206.El
207.Pp
208The data argument of the ioctl call has an address of the options structure:
209.Bd -literal
210typedef struct {
211 unsigned char board; /* adapter number, 0..2 */
212 unsigned char channel; /* channel number, 0..15 */
213 unsigned char type; /* channel type (read only) */
214 unsigned char iftype; /* chan0 interface */
215 unsigned long rxbaud; /* receiver speed */
216 unsigned long txbaud; /* transmitter speed */
217 cx_chan_mode_t mode; /* channel mode */
218 cx_chan_opt_t opt; /* common channel options */
219 cx_opt_async_t aopt; /* async mode options */
220 cx_opt_hdlc_t hopt; /* hdlc mode options */
221 cx_opt_bisync_t bopt; /* bisync mode options */
222 cx_opt_x21_t xopt; /* x.21 mode options */
223 cx_soft_opt_t sopt; /* software options and state flags */
224} cx_options_t; /* user settable options */
225.Ed
226.Pp
227.Bl -tag -width rxbaudxxx
228.It Fa board
229The adapter number, 0..2.
230.It Fa channel
231The channel number, 0..15.
232.It Fa type
233The type of the channel (read-only argument).
234.It Fa iftype
235The interface type of the zero (and also the eight) channel: 0 - RS-232,
2361 - RS-449/V.35.
237.It Fa rxbaud
238The receiver data baud rate.
239.It Fa txbaud
240The transmitter data baud rate.
241.It Fa mode
242The channel mode: asynchronous/HDLC/Bisync/X.21.
243.It Fa opt
244The general channel options.
245.It Fa aopt
246The asynchronous mode options.
247.It Fa hopt
248The HDLC mode options.
249.It Fa bopt
250The Bisync mode options.
251.It Fa xopt
252The X.21 mode options.
253.It Fa sopt
254The software protocol options.
255.El
256.Sh FILES
257.Bl -tag -width /dev/cxXXXX -compact
258.It Pa /dev/cx??
259Asynchronous channels.
260.It Pa /dev/cronyx
261The special device file for the channel options management.
262.El
263.Pp
264The sources for the driver reside in:
265.Pp
266.Bl -tag -width /dev/cxXXXX -compact
267.It Pa /sys/i386/isa/cronyx.c
268.It Pa /sys/i386/isa/cx.c
269.It Pa /sys/i386/isa/if_cx.c
270.It Pa /sys/i386/isa/cronyx.h
271.It Pa /sys/i386/isa/cxreg.h
272.It Pa /sys/net/if_spppsubr.c
273.It Pa /sys/net/if_sppp.h
274.El
|
76Refere to 77.Xr sconfig 8 78for information about the 79.Nm 80adapter configuration. |
81.Sh SEE ALSO
|
276.Xr cxconfig 8 ,
277.Xr ifconfig 8
|
82.Xr cx 4 , 83.Xr sppp 4 , 84.Xr ifconfig 8 , 85.Xr sconfig 8 , 86.Xr spppcontrol 8 87.Sh HISTORY 88The 89.Nm 90driver was updated in 91.Fx 5.2 . 92In most of previous versions of 93.Fx 94the 95.Nm 96driver is out of date. 97The 98.Nm 99driver for previous versions of 100.Fx 101is available from 102.Pa http://www.cronyx.ru/ . |
|