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