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