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