1.TH Cronyx-Sigma 1
2.rm ES
3.rm EE
4.de ES
5.PP
6.nf
7.in +0.5i
8..
9.de EE
10.in -0.5i
11.fi
12..
13.na
14.SH NAME
15.B cx
16\- asynchronous Cronyx-Sigma adapter driver
17.br
18.B if_cx
19\- synchronous Cronyx-Sigma adapter driver
20.SH CONFIGURATION
21.B
22device cx0 at isa? port 0x240 irq 15 drq 7
23.br
24.B
25device cx1 at isa? port 0x260 irq 12 drq 6
26.br
27.B
28pseudo-device sppp
29.P
|
1.Dd "December 12, 1994" 2.Dt CX 4 i386 3.Os FreeBSD 4.Sh NAME 5.Nm cx , 6.Nm if_cx 7.Nd asynchronous/synchronous Cronyx-Sigma adapter driver 8.Sh CONFIGURATION 9.Cd "device cx0 at isa? port 0x240 irq 15 drq 7" 10.Cd "device cx1 at isa? port 0x260 irq 12 drq 6" 11.Cd pseudo-device sppp 12.Pp |
13The base i/o port address should be set by jumpers on the board. 14The DMA i/o channel and interrupt request numbers are configured 15by software at adapter initialization. Legal values are:
|
33.IP Port
|
16.Pp 17.Bl -tag -compact -width Port 18.It Port |
190x240, 0x260, 0x280, 0x300, 0x320, 0x380
|
35.IP IRQ
|
20.It IRQ |
213, 5, 7, 10, 11, 12, 15
|
37.IP DMA
|
22.It DMA |
235, 6, 7
|
39.SH DESCRIPTION
40.PP
|
24.Sh DESCRIPTION |
25The Cronyx-Sigma driver supports the adapters of models 100, 26400, 500, 401, 404, 410, 440, 703, 801, 810, 840. Different models have 27different set of channels:
|
44.ES
45 Model Channels
46----------------------------------------------
47 Cronyx-Sigma-100 0
48 Cronyx-Sigma-400 4, 5, 6, 7
49 Cronyx-Sigma-500 0, 4, 5, 6, 7
50 Cronyx-Sigma-401 0, 1, 2, 3
51 Cronyx-Sigma-404 0, 1, 2, 3
52 Cronyx-Sigma-410 0, 1, 2, 3
53 Cronyx-Sigma-440 0, 1, 2, 3
54 Cronyx-Sigma-703 0, 1, 2, 4, 5, 6, 7
55 Cronyx-Sigma-801 0, 1, 2, 3, 4, 5, 6, 7
56 Cronyx-Sigma-810 0, 1, 2, 3, 4, 5, 6, 7
57 Cronyx-Sigma-840 0, 1, 2, 3, 4, 5, 6, 7
58.EE
59.PP
|
28.Pp 29.Bl -tag -compact -width Cronyx-Sigma-999 30.It Model 31Channels 32.It Cronyx-Sigma-100 330 34.It Cronyx-Sigma-400 354, 5, 6, 7 36.It Cronyx-Sigma-500 370, 4, 5, 6, 7 38.It Cronyx-Sigma-401 390, 1, 2, 3 40.It Cronyx-Sigma-404 410, 1, 2, 3 42.It Cronyx-Sigma-410 430, 1, 2, 3 44.It Cronyx-Sigma-440 450, 1, 2, 3 46.It Cronyx-Sigma-703 470, 1, 2, 4, 5, 6, 7 48.It Cronyx-Sigma-801 490, 1, 2, 3, 4, 5, 6, 7 50.It Cronyx-Sigma-810 510, 1, 2, 3, 4, 5, 6, 7 52.It Cronyx-Sigma-840 530, 1, 2, 3, 4, 5, 6, 7 54.El 55.Pp |
56A pair of two adapters can be united together by the special 57short inter-board cable. Two united adapters use the same 58IRQ and DMA channels and from the point of driver works 59as the single 16-channel multiplexer. One of the united 60boards is ``master'' and the other is ``slave''.
|
65.PP
|
61.Pp |
62The channels of the slave united board are numbered by the driver 63beginning with 8, for example, the united adapter of the model 100/500 64has channels 0, 8, 12, 13, 14, 15.
|
69.PP
|
65.Pp |
66The channels which have the RS-232 interface can be used 67both in synchronous and asynchronous modes (software selectable 68by cxconfig utility) and hence are called ``universal'' channels.
|
73.PP
74The special device files (/dev/*) for the adapter Cronyx-Sigma
75are created by the command file ``/dev/MAKEDEV.cx''.
|
69.Pp 70The special device files, 71.Pa /dev/* , 72for the adapter Cronyx-Sigma 73are created by th 74.Xr MAKEDEV 8 |
75An example:
|
77.ES
|
76.Bd -literal |
77cd /dev
|
79sh MAKEDEV.cx cronyx ttyx0 ttyx1 ttyy0
80.EE
81.SH "Asynchronous driver"
82.PP
|
78sh MAKEDEV cronyx ttyx0 ttyx1 ttyy0 79.El 80.Sh "Asynchronous driver" 81.Pp |
82The asynchronous channel device files have the names:
|
84/dev/ttyx# - for adapter cx0, /dev/ttyy# - for adapter cx1,
85/dev/ttyz# - for cx2.
86Here\ # is the channel number in hexadecimal form, 0-9-a-f.
87.PP
88The driver fulfills the following standard ioctl requests (see ioctl(2)):
89.IP TIOCSBRK
|
83.Pa /dev/ttyx# 84- for adapter cx0, 85.Pa /dev/ttyy# 86- for adapter cx1, 87.Pa /dev/ttyz# 88- for cx2. 89Here # is the channel number in hexadecimal form, 0-9-a-f. 90.Pp 91The driver fulfills the following standard ioctl requests (see 92.Xr ioctl ) : 93.Pp 94.Bl -tag -width TIOCXXXXX -compact 95.It Dv TIOCSBRK |
96Start sending BREAK.
|
91.IP TIOCCBRK
|
97.It Dv TIOCCBRK |
98Stop sending BREAK.
|
93.IP TIOCSDTR
|
99.It Dv TIOCSDTR |
100Set DTR signal (DTR := 1). The DTR signal is always set 101on the first open(2) and could be changed by
|
96TIOCCDTR, TIOCSDTR, TIOCMSET, TIOCMBIS, TIOCMBIC ioctl calls.
97.IP TIOCCDTR
|
102.Dv TIOCCDTR , 103.Dv TIOCSDTR , 104.Dv TIOCMSET , 105.Dv TIOCMBIS , 106.Dv TIOCMBIC 107ioctl calls. 108.It TIOCCDTR |
109Clear DTR signal (DTR := 0).
|
99.IP TIOCMSET
|
110.It TIOCMSET |
111Set the given values of DTR and RTS signals (<DTR:RTS> := data).
|
101The signals DTR and RTS are controlled by TIOCM_DTR and TIOCM_RTS
|
112The signals DTR and RTS are controlled by 113.Dv TIOCM_DTR 114and 115.DvTIOCM_RTS |
116bits of the data argument of the ioctl system call.
|
103.IP TIOCMBIS
|
117.It TIOCMBIS |
118Set DTR and RTS signals (<DTR:RTS> |= data).
|
105The signals DTR and RTS are controlled by TIOCM_DTR and TIOCM_RTS
|
119The signals DTR and RTS are controlled by 120.Dv TIOCM_DTR 121and 122.Dv TIOCM_RTS |
123bits of the data argument of the ioctl system call.
|
107.IP TIOCMBIC
|
124.It TIOCMBIC |
125Clear DTR and RTS signals (<DTR:RTS> &= ~data).
|
109The signals DTR and RTS are controlled by TIOCM_DTR and TIOCM_RTS
|
126The signals DTR and RTS are controlled by 127.Dv TIOCM_DTR 128and 129.Dv TIOCM_RTS |
130bits of the data argument of the ioctl system call.
|
111.IP TIOCMGET
|
131.It TIOCMGET |
132Determine the state of the modem signals of the line. 133After the call the data argument contains the following bits:
|
114.ES
115TIOCM_LE - always set (Line Enabled)
116TIOCM_DSR - Data Set Ready signal received
117TIOCM_CTS - Clear To Send signal received
118TIOCM_CD - Data Carrier Detect signal received
119TIOCM_DTR - Data Terminal Ready signal transmitted
120TIOCM_RTS - Request To Send signal transmitted
121.EE
122.SH "Synchronous driver"
123.PP
|
134.Pp 135.Bl -tag -width TIOCM_XXX -compact 136.It TIOCM_LE 137always set (Line Enabled) 138.It TIOCM_DSR 139Data Set Ready signal received 140.It TIOCM_CTS 141Clear To Send signal received 142.It TIOCM_CD 143Data Carrier Detect signal received 144.It TIOCM_DTR 145Data Terminal Ready signal transmitted 146.It TIOCM_RTS 147Request To Send signal transmitted 148.El 149.El 150.Sh "Synchronous driver" 151.Pp |
152The synchronous channels and universal channels, turned to the synchronous
|
125mode by the cxconfig(8) utility, are accessible as network
126interfaces named ``cx#'' where\ # is the channel number, 0..47.
127All standard network interface parameters could be set by ifconfig(8) utility.
128The cxconfig(8) command is used to change some extended channel
|
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. 160The 161.Xr cxconfig 8 162command is used to change some extended channel |
163options, and also for setting the high-level software protocol
|
130(e.g. PPP or Cisco HDLC).
131.PP
|
164(e.g. PpP or Cisco HDLC). 165.Pp |
166The universal channels could be used both in asynchronous and synchronous modes. 167By default the asynchronous mode is set.
|
134The mode could be changed by cxconfig(8) utility.
|
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).
|
137.SH "Synchronous Point-to-Point protocol"
138.PP
|
173.Sj "Synchronous Point-to-Point protocol" 174.Pp |
175The Cronyx-Sigma driver uses the built-in implementation of the synchronous 176Point-to-Point protocol (sppp). It includes the support for such
|
141protocols as PPP/HDLC and Cisco/HDLC, and also the automatic
|
177protocols as PpP/HDLC and Cisco/HDLC, and also the automatic |
178connection loss test (via keepalive packets). 179The sppp protocol set is implemented as an independent module 180and could be used by other drivers of synchronous serial channels. 181The version of the driver for BSD/386 (BSDI) operating system 182also supports the usage of the general set of synchronous 183protocols, implemented inside the OS. 184The external protocol set could be selected by ``cxconfig ext'' command
|
149(see cxconfig(8)).
150.SH "Channel Options Management"
151.PP
152The cxconfig(8) utility is used for setting the channels options.
|
185(see 186.Xr cxconfig 8 ) . 187.Sh "Channel Options Management" 188.Pp 189The 190.Xr cxconfig 8 191utility is used for setting the channels options. |
192The channel options are generally set at the start of the operating
|
154system (for example, from the file /etc/rc).
|
193system (for example, from the file 194.Pa /etc/rc ) . |
195Note, that not all options have a sense for every particular 196case, and an attempt to set some of them can hang up the channel or 197the whole adapter.
|
158.PP
|
198.Pp |
199The actual channel options control functions are implemented via 200the ioctl-s on the special device file /dev/cronyx. 201There are the following ioctl-s available:
|
162.IP CXIOCGETMODE
|
202.Pp 203.Bl -tag -width CXIOCXXXXXXX -compact 204.It CXIOCGETMODE |
205Get the channel option values.
|
164.IP CXIOCSETMODE
|
206.It CXIOCSETMODE |
207Set the channel option values.
|
166.PP
|
208.El 209.Pp |
210The data argument of the ioctl call has an address of the options structure:
|
168.ES
|
211.Bd -literal |
212typedef struct { 213 unsigned char board; /* adapter number, 0..2 */ 214 unsigned char channel; /* channel number, 0..15 */ 215 unsigned char type; /* channel type (read only) */ 216 unsigned char iftype; /* chan0 interface */ 217 unsigned long rxbaud; /* receiver speed */ 218 unsigned long txbaud; /* transmitter speed */ 219 cx_chan_mode_t mode; /* channel mode */ 220 cx_chan_opt_t opt; /* common channel options */ 221 cx_opt_async_t aopt; /* async mode options */ 222 cx_opt_hdlc_t hopt; /* hdlc mode options */ 223 cx_opt_bisync_t bopt; /* bisync mode options */ 224 cx_opt_x21_t xopt; /* x.21 mode options */ 225 cx_soft_opt_t sopt; /* software options and state flags */ 226} cx_options_t; /* user settable options */
|
184.EE
185.IP board
|
227.Ed 228.Pp 229.Bl -tag -width rxbaudxxx 230.It Fa board |
231The adapter number, 0..2.
|
187.IP channel
|
232.It Fa channel |
233The channel number, 0..15.
|
189.IP type
|
234.It Fa type |
235The type of the channel (read-only argument).
|
191.IP iftype
|
236.It Fa iftype |
237The interface type of the zero (and also the eight) channel: 0 - RS-232, 2381 - RS-449/V.35.
|
194.IP rxbaud
|
239.It Fa rxbaud |
240The receiver data baud rate.
|
196.IP txbaud
|
241.It Fa txbaud |
242The transmitter data baud rate.
|
198.IP mode
|
243.It Fa mode |
244The channel mode: asynchronous/HDLC/Bisync/X.21.
|
200.IP opt
|
245.It Fa opt |
246The general channel options.
|
202.IP aopt
|
247.It Fa aopt |
248The asynchronous mode options.
|
204.IP hopt
|
249.It Fa hopt |
250The HDLC mode options.
|
206.IP bopt
|
251.It Fa bopt |
252The Bisync mode options.
|
208.IP xopt
|
253.It Fa xopt |
254The X.21 mode options.
|
210.IP sopt
|
255.It Fa sopt |
256The software protocol options.
|
212.SH FILES
213.PP
214/dev/cx??
215.IP
|
257.El 258.Sh FILES 259.Bl -tag -width /dev/cxXXXX -compact 260.It Pa /dev/cx?? |
261Asynchronous channels.
|
217.PP
218/dev/cronyx
219.IP
|
262.It Pa /dev/cronyx 263.El |
264The special device file for the channel options management.
|
221.PP
222/sys/i386/isa/cronyx.c
223.br
224/sys/i386/isa/cx.c
225.br
226/sys/i386/isa/if_cx.c
227.br
228/sys/i386/isa/cronyx.h
229.br
230/sys/i386/isa/cxreg.h
231.br
232/sys/net/if_spppsubr.c
233.br
234/sys/net/if_sppp.h
235.IP
236The sources of the driver.
237.SH SEE ALSO
238.PP
239cxconfig(8)
|
265.Pp 266The sources for the driver reside in: 267.Pp 268.Bl -tag -width /dev/cxXXXX -compact 269.It Pa /sys/i386/isa/cronyx.c 270.It Pa /sys/i386/isa/cx.c 271.It Pa /sys/i386/isa/if_cx.c 272.It Pa /sys/i386/isa/cronyx.h 273.It Pa /sys/i386/isa/cxreg.h 274.It Pa /sys/net/if_spppsubr.c 275.It Pa /sys/net/if_sppp.h 276.El 277.Sh SEE ALSO 278.Xr cxconfig 8 , 279.Xr ifconfig 8 |
|