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