digi.4: Remove some wrong documentation.
[dragonfly.git] / share / man / man4 / man4.i386 / digi.4
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.15 1994/12/06 20:14:30 bde Exp
38 .\" $FreeBSD: src/share/man/man4/man4.i386/dgb.4,v 1.13.2.6 2001/08/17 13:08:45 ru Exp $
39 .\"
40 .Dd August 6, 2009
41 .Dt DIGI 4 i386
42 .Os
43 .Sh NAME
44 .Nm digi
45 .Nd DigiBoard intelligent serial cards driver
46 .Sh SYNOPSIS
47 To compile this driver into the kernel, place the following line in your
48 kernel configuration file:
49 .Bd -ragged -offset indent
50 .Cd "device digi0 at isa? port 0x220 iomem 0xfc0000 iosiz ? flags 0x0"
51 .Ed
52 All values are just examples.
53 .Pp
54 To load this driver as a module at boot time, place the following line in
55 .Xr loader.conf 5 :
56 .Bd -literal -offset indent
57 digi_load="YES"
58 .Ed
59 .Pp
60 Meaning of
61 .Cm flags :
62 .Bl -tag -width indent -compact
63 .It 0x0001
64 use alternate pinout (exchange DCD and DSR lines)
65 .It 0x0002
66 don't use 8K window mode of PC/Xe
67 .El
68 .Pp
69 Device numbering:
70 .Bd -literal -compact
71 0b\fICC\fPmmmmmmmm\fIOLIPPPPP\fP
72   \fBCC\fPard number
73     \fRmmmmmmmm\fPajor number
74             call\fBO\fPut
75              \fBL\fPock
76               \fBI\fPnitial
77                \fBPPPPP\fPort number
78 .Ed
79 .Sh DESCRIPTION
80 The
81 .Nm
82 driver provides support for DigiBoard PC/Xe and PC/Xi series intelligent
83 serial multiport cards with asynchronous interfaces based on the
84 .Tn EIA
85 .Tn RS-232C
86 .Pf ( Tn CCITT
87 .Tn V.24 )
88 standard.
89 .Pp
90 Input and output for each line may set to one of following baud rates;
91 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
92 19200, 38400, 57600, or for newer versions of cards 115200.
93 .Pp
94 The driver doesn't use any interrupts, it is
95 .Dq polling\-based .
96 This means that
97 it uses clock interrupts instead of interrupts generated by DigiBoard cards and
98 checks the state of cards 25 times per second.
99 This is practical because the
100 DigiBoard cards have large input and output buffers (more than 1Kbyte per
101 port) and hardware that allows efficiently finding the port that needs
102 attention.
103 The only problem seen with this policy is slower
104 SLIP and PPP response.
105 .Pp
106 Each line in the kernel configuration file describes one card, not one port
107 as in the
108 .Xr sio 4
109 driver.
110 .Pp
111 The
112 .Cm flags
113 keyword may be used on each
114 .Dq Li "device digi"
115 line in the kernel configuration file
116 to change the pinout of the interface or to use new PC/Xe cards
117 which can work with an 8K memory window in compatibility mode
118 (with a 64K memory window).
119 Note
120 that using 8K memory window doesn't mean shorter input/output buffers, it means
121 only that all buffers will be mapped to the same memory address and switched as
122 needed.
123 .Pp
124 The
125 .Cm port
126 value must be the same
127 as the
128 port
129 set on the card by jumpers.
130 For PC/Xi cards the same rule is applicable to the
131 .Cm iomem
132 value.
133 It must be the same as the memory address set on the card
134 by jumpers.
135 .\"Some documentation gives the address as a ``paragraph'' or ``segment'';
136 .\"you can get the value of address by adding the digit "0" at end of
137 .\"paragraph value, e.g., 0xfc000 -> 0xfc0000.
138 For PC/Xe cards there is no need to use jumpers for this purpose.
139 In fact there are no jumpers to do it.
140 Just
141 write the address you want as the
142 .Cm iomem
143 value in kernel config file and the card will be programmed
144 to use this address.
145 .Pp
146 The same range of memory addresses may be used
147 for all the DigiBoards installed
148 (but not for any other card or real memory).
149 DigiBoards
150 with a large amount of memory (256K or 512K and perhaps
151 even 128K) must be mapped
152 to memory addresses outside of the first megabyte.
153 If the computer
154 has more than 15 megabytes of memory then there is no free address space
155 outside of the first megabyte where such DigiBoards can be mapped.
156 In this case you
157 may need to reduce the amount of memory in the computer.
158 But many machines provide a better solution.
159 They have the ability to
160 .Dq "turn off"
161 the memory in the 16th megabyte (addresses 0xF00000 - 0xFFFFFF)
162 using the
163 BIOS setup.
164 Then the DigiBoard's address space can be set to this
165 .Dq hole .
166 .\" XXX the following should be true for all serial drivers and
167 .\" should not be repeated in the man pages for all serial drivers.
168 .\" It was copied from sio.4.  The only changes were s/sio/digi/g.
169 .Pp
170 Serial ports controlled by the
171 .Nm
172 driver can be used for both
173 .Dq callin
174 and
175 .Dq callout .
176 For each port there is a callin device and a callout device.
177 The minor number of the callout device is 128 higher
178 than that of the corresponding callin port.
179 The callin device is general purpose.
180 Processes opening it normally wait for carrier
181 and for the callout device to become inactive.
182 The callout device is used to steal the port from
183 processes waiting for carrier on the callin device.
184 Processes opening it do not wait for carrier
185 and put any processes waiting for carrier on the callin device into
186 a deeper sleep so that they do not conflict with the callout session.
187 The callout device is abused for handling programs that are supposed
188 to work on general ports and need to open the port without waiting
189 but are too stupid to do so.
190 .Pp
191 The
192 .Nm
193 driver also supports an initial-state and a lock-state control
194 device for each of the callin and the callout
195 .Dq data
196 devices.
197 The minor number of the initial-state device is 32 higher
198 than that of the corresponding data device.
199 The minor number of the lock-state device is 64 higher
200 than that of the corresponding data device.
201 The termios settings of a data device are copied
202 from those of the corresponding initial-state device
203 on first opens and are not inherited from previous opens.
204 Use
205 .Xr stty 1
206 in the normal way on the initial-state devices to program
207 initial termios states suitable for your setup.
208 .Pp
209 The lock termios state acts as flags to disable changing
210 the termios state.
211 E.g., to lock a flag variable such as
212 .Dv CRTSCTS ,
213 use
214 .Dq Li "stty crtscts"
215 on the lock-state device.
216 Speeds and special characters
217 may be locked by setting the corresponding value in the lock-state
218 device to any nonzero value.
219 .Pp
220 Correct programs talking to correctly wired external devices
221 .\" XXX change next line in other man pages too, and rewrite this paragraph.
222 work with almost arbitrary initial states and no locking,
223 but other setups may benefit from changing some of the default
224 initial state and locking the state.
225 In particular, the initial states for non (POSIX) standard flags
226 should be set to suit the devices attached and may need to be
227 locked to prevent buggy programs from changing them.
228 E.g.,
229 .Dv CRTSCTS
230 should be locked on for devices that support
231 RTS/CTS handshaking at all times and off for devices that don't
232 support it at all.
233 .Dv CLOCAL
234 should be locked on for devices
235 that don't support carrier.
236 .Dv HUPCL
237 may be locked off if you don't
238 want to hang up for some reason.
239 In general, very bad things happen
240 if something is locked to the wrong state, and things should not
241 be locked for devices that support more than one setting.
242 The
243 .Dv CLOCAL
244 flag on callin ports should be locked off for logins
245 to avoid certain security holes, but this needs to be done by
246 getty if the callin port is used for anything else.
247 .Sh FILES
248 .Bl -tag -width /dev/ttyiD?? -compact
249 .It Pa /dev/ttyD??
250 for callin ports
251 .It Pa /dev/ttyiD??
252 .It Pa /dev/ttylD??
253 corresponding callin initial-state and lock-state devices
254 .Pp
255 .It Pa /dev/cuaD??
256 for callout ports
257 .It Pa /dev/cuaiD??
258 .It Pa /dev/cualD??
259 corresponding callout initial-state and lock-state devices
260 .El
261 .Pp
262 .Bl -tag -width /etc/rc.d/serial -compact
263 .It Pa /etc/rc.d/serial
264 examples of setting the initial-state and lock-state devices
265 .El
266 .Pp
267 The first question mark in these device names is short for the
268 card number
269 (a decimal number between 0 and 65535 inclusive).
270 The second question mark is short for the port number
271 (a letter in the range [0-9a-v]).
272 .Sh DIAGNOSTICS
273 You may enable extended diagnostics by defining DEBUG at the
274 start of the source file
275 .Pa digi.c .
276 .Bl -diag
277 .It digi\fIX\fP: warning: address \fIN\fP truncated to \fIM\fP
278 The memory address for the PC/Xe's 8K window is misaligned (it should be
279 on an 8K boundary) or outside of the first megabyte.
280 .It digi\fIX\fP: 1st reset failed
281 Problems with accessing I/O port of the card, probably
282 the wrong
283 .Cm port
284 value is specified in the kernel config file.
285 .It digi\fIX\fP: 2nd reset failed
286 Problems with hardware.
287 .It digi\fIX\fP: \fIN\fP[st,nd,rd,th] memory test failed
288 Problems with accessing the memory of the card, probably
289 the wrong
290 .Cm iomem
291 value is specified in the kernel config file.
292 .It digi\fIX\fP: BIOS start failed
293 Problems with starting the on-board BIOS.
294 Probably the memory addresses of the
295 DigiBoard overlap with some other device or with RAM.
296 .It digi\fIX\fP: BIOS download failed
297 Problems with the on-board BIOS.
298 Probably the memory addresses of the
299 DigiBoard overlap with some other device or with RAM.
300 .It digi\fIX\fP: FEP code download failed
301 Problems with downloading of the Front-End Processor's micro-OS.
302 Probably the memory addresses of the
303 DigiBoard overlap with some other device or with RAM.
304 .It digi\fIX\fP: FEP/OS start failed
305 Problems with starting of the Front-End Processor's micro-OS.
306 Probably the memory addresses of the
307 DigiBoard overlap with some other device or with RAM.
308 .It digi\fIX\fP: too many ports
309 This DigiBoard reports that it has more than 32 ports.
310 Perhaps a hardware problem or
311 the memory addresses of the
312 DigiBoard overlap with some other device or with RAM.
313 .It digi\fIX\fP: port \fIY\fP is broken
314 The on-board diagnostic has reported that the specified port has hardware
315 problems.
316 .It digi\fIX\fP: polling of disabled board stopped
317 Internal problems in the polling logic of driver.
318 .It digi\fIX\fP: event queue's head or tail is wrong!
319 Internal problems in the driver or hardware.
320 .It digi\fIX\fP: port \fIY\fP: got event on nonexisting port
321 Some status changed on a port that is physically present but is
322 unusable due to misconfiguration.
323 .It digi\fIX\fP: port \fIY\fP: event \fIN\fP mstat \fIM\fP lstat \fIK\fP
324 The driver got a strange event from card.
325 Probably this means that you have a
326 newer card with an extended list of events or some other hardware problem.
327 .It digi\fIX\fP: port \fIY\fP: overrun
328 Input buffer has filled up.
329 Problems in polling logic of driver.
330 .It digi\fIX\fP: port \fIY\fP: FEP command on disabled port
331 Internal problems in driver.
332 .It digi\fIX\fP: port \fIY\fP: timeout on FEP command
333 Problems in hardware.
334 .El
335 .Sh SEE ALSO
336 .Xr stty 1 ,
337 .Xr termios 4 ,
338 .Xr tty 4 ,
339 .Xr comcontrol 8
340 .Sh HISTORY
341 The
342 .Nm
343 driver is derived from the
344 .Xr sio 4
345 driver and the DigiBoard driver from
346 .Tn Linux
347 and is
348 .Ud
349 .Sh BUGS
350 The implementation of sending
351 .Dv BREAK
352 is broken.
353 .Dv BREAK
354 of fixed length of \(14 s
355 is sent anyway.
356 .Pp
357 There was a bug in implementation of
358 .Xr select 2 .
359 It is fixed now but not widely tested yet.
360 .Pp
361 There is no ditty command.
362 Most of its functions (alternate pinout,
363 speed up to 115200 baud, etc.) are implemented in the driver itself.
364 Some
365 other functions are missing.