2 .\" $FreeBSD: src/share/man/man4/man4.i386/cx.4,v 1.7.2.6 2001/08/17 13:08:45 ru Exp $
3 .\" $DragonFly: src/share/man/man4/man4.i386/cx.4,v 1.4 2006/11/14 22:27:49 swildner Exp $
10 .Nd asynchronous/synchronous Cronyx-Sigma adapter driver
12 .Cd "device cx0 at isa? port 0x240 irq 15 drq 7"
13 .Cd "device cx1 at isa? port 0x260 irq 12 drq 6"
14 .Cd pseudo-device sppp
16 The base i/o port address should be set by jumpers on the board.
17 The DMA i/o channel and interrupt request numbers are configured
18 by software at adapter initialization. Legal values are:
20 .Bl -tag -compact -width Port
22 0x240, 0x260, 0x280, 0x300, 0x320, 0x380
24 3, 5, 7, 10, 11, 12, 15
29 The Cronyx-Sigma driver supports the adapters of models 100,
30 400, 500, 401, 404, 410, 440, 703, 801, 810, 840. Different models have
31 different set of channels:
33 .Bl -tag -compact -width Cronyx-Sigma-999
53 0, 1, 2, 3, 4, 5, 6, 7
55 0, 1, 2, 3, 4, 5, 6, 7
57 0, 1, 2, 3, 4, 5, 6, 7
60 A pair of two adapters can be united together by the special
61 short inter-board cable. Two united adapters use the same
62 IRQ and DMA channels and from the point of driver works
63 as the single 16-channel multiplexer. One of the united
64 boards is ``master'' and the other is ``slave''.
66 The channels of the slave united board are numbered by the driver
67 beginning with 8, for example, the united adapter of the model 100/500
68 has channels 0, 8, 12, 13, 14, 15.
70 The channels which have the RS-232 interface can be used
71 both in synchronous and asynchronous modes (software selectable
72 by cxconfig utility) and hence are called ``universal'' channels.
74 The special device files,
76 for the adapter Cronyx-Sigma
82 sh MAKEDEV cronyx ttyx0 ttyx1 ttyy0
84 .Sh "Asynchronous driver"
85 The asynchronous channel device files have the names:
92 Here # is the channel number in hexadecimal form, 0-9-a-f.
94 The driver fulfills the following standard ioctl requests (see
97 .Bl -tag -width TIOCXXXXX -compact
103 Set DTR signal (DTR := 1). The DTR signal is always set
106 and could be changed by
114 Clear DTR signal (DTR := 0).
116 Set the given values of DTR and RTS signals (<DTR:RTS> := data).
117 The signals DTR and RTS are controlled by
121 bits of the data argument of the ioctl system call.
123 Set DTR and RTS signals (<DTR:RTS> |= data).
124 The signals DTR and RTS are controlled by
128 bits of the data argument of the ioctl system call.
130 Clear DTR and RTS signals (<DTR:RTS> &= ~data).
131 The signals DTR and RTS are controlled by
135 bits of the data argument of the ioctl system call.
137 Determine the state of the modem signals of the line.
138 After the call the data argument contains the following bits:
140 .Bl -tag -width TIOCM_XXX -compact
142 always set (Line Enabled)
144 Data Set Ready signal received
146 Clear To Send signal received
148 Data Carrier Detect signal received
150 Data Terminal Ready signal transmitted
152 Request To Send signal transmitted
155 .Sh "Synchronous driver"
156 The synchronous channels and universal channels, turned to the synchronous
159 utility, are accessible as network
160 interfaces named ``cx#'' where # is the channel number, 0..47.
161 All standard network interface parameters could be set by
166 command is used to change some extended channel
167 options, and also for setting the high-level software protocol
168 (e.g. PpP or Cisco HDLC).
170 The universal channels could be used both in asynchronous and synchronous modes.
171 By default the asynchronous mode is set.
172 The mode could be changed by
175 The mode is blocked while the channel is busy (an asynchronous channel
176 in open state or the network interface is up).
177 .Sh "Synchronous Point-to-Point protocol"
178 The Cronyx-Sigma driver uses the built-in implementation of the synchronous
179 Point-to-Point protocol (sppp). It includes the support for such
180 protocols as PpP/HDLC and Cisco/HDLC, and also the automatic
181 connection loss test (via keepalive packets).
182 The sppp protocol set is implemented as an independent module
183 and could be used by other drivers of synchronous serial channels.
184 The version of the driver for BSD/386 (BSDI) operating system
185 also supports the usage of the general set of synchronous
186 protocols, implemented inside the OS.
187 The external protocol set could be selected by ``cxconfig ext'' command
190 .Sh "Channel Options Management"
193 utility is used for setting the channels options.
194 The channel options are generally set at the start of the operating
195 system (for example, from the file
197 Note, that not all options have a sense for every particular
198 case, and an attempt to set some of them can hang up the channel or
201 The actual channel options control functions are implemented via
202 the ioctl-s on the special device file /dev/cronyx.
203 There are the following ioctl-s available:
205 .Bl -tag -width CXIOCXXXXXXX -compact
207 Get the channel option values.
209 Set the channel option values.
212 The data argument of the ioctl call has an address of the options structure:
215 unsigned char board; /* adapter number, 0..2 */
216 unsigned char channel; /* channel number, 0..15 */
217 unsigned char type; /* channel type (read only) */
218 unsigned char iftype; /* chan0 interface */
219 unsigned long rxbaud; /* receiver speed */
220 unsigned long txbaud; /* transmitter speed */
221 cx_chan_mode_t mode; /* channel mode */
222 cx_chan_opt_t opt; /* common channel options */
223 cx_opt_async_t aopt; /* async mode options */
224 cx_opt_hdlc_t hopt; /* hdlc mode options */
225 cx_opt_bisync_t bopt; /* bisync mode options */
226 cx_opt_x21_t xopt; /* x.21 mode options */
227 cx_soft_opt_t sopt; /* software options and state flags */
228 } cx_options_t; /* user settable options */
231 .Bl -tag -width rxbaudxxx
233 The adapter number, 0..2.
235 The channel number, 0..15.
237 The type of the channel (read-only argument).
239 The interface type of the zero (and also the eight) channel: 0 - RS-232,
242 The receiver data baud rate.
244 The transmitter data baud rate.
246 The channel mode: asynchronous/HDLC/Bisync/X.21.
248 The general channel options.
250 The asynchronous mode options.
252 The HDLC mode options.
254 The Bisync mode options.
256 The X.21 mode options.
258 The software protocol options.
261 .Bl -tag -width /dev/cxXXXX -compact
263 Asynchronous channels.
265 The special device file for the channel options management.
268 The sources for the driver reside in:
270 .Bl -tag -width /dev/cxXXXX -compact
271 .It Pa /sys/dev/serial/cronyx/cronyx.c
272 .It Pa /sys/dev/netif/cx/cx.c
273 .It Pa /sys/dev/netif/cx/if_cx.c
274 .It Pa /sys/machine/pc32/include/cronyx.h
275 .It Pa /sys/dev/netif/cx/cxreg.h
276 .It Pa /sys/net/sppp/if_spppsubr.c
277 .It Pa /sys/net/sppp/if_sppp.h