1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ECPP 7D "May 13, 2017"
7 .SH NAME
8 ecpp \- IEEE 1284 compliant parallel port driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/types.h>
13 .fi
14
15 .LP
16 .nf
17 #include <sys/ecppio.h>
18 .fi
19
20 .LP
21 .nf
22 ecpp@unit-address
23 .fi
24
25 .SH DESCRIPTION
26 .LP
27 The \fBecpp\fR driver provides a bi-directional interface to \fIIEEE 1284\fR
28 compliant devices as well as a forward single-directional interface to
29 Centronics devices. In addition to the Centronics protocol, the \fBecpp\fR
30 driver supports the \fIIEEE 1284\fRCompatibility, Nibble, and ECP protocols.
31 \fBECPP_COMPAT_MODE\fR and \fBECPP_CENTRONICS\fR modes of operation have
32 logically identical handshaking protocols, however devices that support
33 \fBECPP_COMPAT_MODE\fR are \fIIEEE 1284\fR compliant devices. \fIIEEE 1284\fR
34 compliant devices support at least \fBECPP_COMPAT_MODE\fR and
35 \fBECPP_NIBBLE_MODE\fR. Centronics devices support only \fBECPP_CENTRONICS\fR
36 mode.
37 .sp
38 .LP
39 By default, \fBECPP_COMPAT_MODE\fR devices have a strobe handshaking pulse
40 width of 500ns. For this mode, forward data transfers are conducted by DMA. By
41 default, the strobe pulse width for \fBECPP_CENTRONICS\fR devices is two
42 microseconds. Forward transfers for these devices are managed through PIO. The
43 default characteristics for both \fBECPP_COMPAT_MODE\fR and
44 \fBECPP_CENTRONICS\fR devices may be changed through tunable variables defined
45 in \fBecpp.conf\fR.
46 .sp
47 .LP
48 The \fBecpp\fR driver is an \fIexclusive-use\fR device, meaning that if the
49 device is already open, subsequent opens fail with \fBEBUSY\fR.
50 .SS "Default Operation"
51 .LP
52 Each time the \fBecpp\fR device is opened, the device is marked as \fBEBUSY\fR
53 and the configuration variables are set to their default values. The
54 \fBwrite_timeout\fR period is set to 90 seconds.
55 .sp
56 .LP
57 The driver sets the mode variable according to the following algorithm: The
58 driver initially attempts to negotiate the link into \fBECPP_ECP_MODE\fR during
59 \fBopen\fR(2). If it fails, the driver tries to negotiate into
60 \fBECPP_NIBBLE_MODE\fR mode. If that fails, the driver operates in
61 \fBECPP_CENTRONICS\fR mode. Upon successfully opening the device, \fIIEEE
62 1284\fR compliant devices will be left idle in either reverse idle phase of
63 \fBECPP_ECP_MODE\fR or in \fBECPP_NIBBLE_MODE\fR. Subsequent calls to
64 \fBwrite\fR(2) invokes the driver to move the link into either
65 \fBECPP_COMPAT_MODE\fR or the forward phase of \fBECPP_ECP_MODE\fR. After the
66 transfer completes, the link returns to idle state.
67 .sp
68 .LP
69 The application may attempt to negotiate the device into a specific mode or set
70 the \fBwrite_timeout\fR values through the \fBECPPIOC_SETPARMS\fR
71 \fBioctl\fR(2) call. For mode negotiation to be successful, both the host
72 workstation and the peripheral must support the requested mode.
73 .SS "Tunables"
74 .LP
75 Characteristics of the \fBecpp\fR driver may be tuned by the variables
76 described in \fB/kernel/drv/ecpp.conf\fR. These variables are read by the
77 kernel during system startup. To tune the variables, edit the \fBecpp.conf\fR
78 file and invoke \fBupdate_drv\fR(1M) to have the kernel read the file again.
79 .sp
80 .LP
81 Some Centronics peripherals and certain \fIIEEE 1284\fR compatible peripherals
82 will not operate with the parallel port operating in a fast handshaking mode.
83 If printing problems occur, set "fast-centronics" and "fast-1284-compatible" to
84 "false." See \fB/kernel/drv/ecpp.conf\fR for more information.
85 .SS "Read/Write Operation"
86 .LP
87 The \fBecpp\fR driver is a full duplex STREAMS device driver. While an
88 application is writing to an \fIIEEE 1284\fR compliant device, another thread
89 may read from it.
90 .SS "Write Operation"
91 .LP
92 A \fBwrite\fR(2) operation returns the number of bytes successfully written to
93 the stream head. If a failure occurs while a Centronics device is transferring
94 data, the content of the status bits will be captured at the time of the error
95 and can be retrieved by the application program using the \fBBPPIOC_GETERR\fR
96 \fBioctl\fR(2) call. The captured status information is overwritten each time
97 an attempted transfer or a \fBBPPIOC_TESTIO\fR \fBioctl\fR(2) occurs.
98 .SS "Read Operation"
99 .LP
100 If a failure or error condition occurs during a \fBread\fR(2), the number of
101 bytes successfully read is returned (short read). When attempting to read a
102 port that has no data currently available, \fBread\fR(2) returns \fB0\fR if
103 \fBO_NDELAY\fR is set. If \fBO_NONBLOCK\fR is set, \fBread\fR(2) returns
104 \fB-1\fR and sets errno to \fBEAGAIN.\fR If \fBO_NDELAY\fR and \fBO_NONBLOCK\fR
105 are clear, \fBread\fR(2) blocks until data become available.
106 .SH IOCTLS
107 .LP
108 The \fBioctl\fR(2) calls described below are supported. Note that when
109 \fBecpp\fR is transferring data, the driver waits until the data has been sent
110 to the device before processing the \fBioctl\fR(2) call.
111 .sp
112 .LP
113 The ecpp driver supports \fBprnio\fR(7I) interfaces.
114 .LP
115 Note -
116 .sp
117 .RS 2
118 The \fBPRNIOC_RESET\fR command toggles the \fBnInit\fR signal for 2 ms,
119 followed by default negotiation.
120 .RE
121 .sp
122 .LP
123 The following \fBioctl\fR(2) calls are supported for backward compatibility and
124 are not recommended for new applications:
125 .sp
126 .ne 2
127 .na
323 .fi
324 .in -2
325
326 The status register is read-only. The \fBECPPIOC_SETREGS\fR ioctl has no affect
327 on this register. Valid bit values for dsr are: \fBECPP_nERR\fR,
328 \fBECPP_SLCT\fR, \fBECPP_PE\fR, \fBECPP_nACK\fR, \fBECPP_nBUSY\fR. All other
329 bits are reserved and always return \fB1\fR.
330 .sp
331 The control register is read/write. Valid bit values for dcr are:
332 \fBECPP_STB\fR, \fBECPP_AFX\fR, \fBECPP_nINIT\fR, \fBECPP_SLCTIN\fR. All other
333 bits are reserved. Reading reserved bits always return 1. An attempt to write
334 0s into these bits results in \fBEINVAL\fR.
335 .RE
336
337 .SH DEVICE SPECIAL FILES
338 .ne 2
339 .na
340 \fB\fB/dev/lp\fIN\fR\fR\fR
341 .ad
342 .RS 19n
343 Solaris x86 only. (Backwards compatibility with former \fBlp\fR(7D) devices.)
344 .RE
345
346 .sp
347 .ne 2
348 .na
349 \fB\fB/dev/printers/\fIN\fR\fR\fR
350 .ad
351 .RS 19n
352 1284 compliant parallel port device special files appears in both namespaces.
353 .RE
354
355 .SH FILES
356 .ne 2
357 .na
358 \fB\fBkernel/drv/ecpp\fR\fR
359 .ad
360 .sp .6
361 .RS 4n
362 32-bit ELF kernel module
363 .RE
364
365 .sp
366 .ne 2
367 .na
368 \fB\fBkernel/drv/sparcv9/ecpp\fR\fR
369 .ad
370 .sp .6
371 .RS 4n
372 64-bit SPARC ELF kernel module
373 .RE
374
375 .sp
376 .ne 2
377 .na
378 \fB\fBkernel/drv/amd64/ecpp\fR\fR
379 .ad
380 .sp .6
381 .RS 4n
382 64-bit x86 ELF kernel module
383 .RE
384
385 .sp
386 .ne 2
387 .na
388 \fB\fBkernel/drv/ecpp.conf\fR\fR
389 .ad
390 .sp .6
391 .RS 4n
392 driver configuration file
393 .RE
394
395 .sp
396 .ne 2
397 .na
398 \fB\fBkernel/drv/sparcv9/ecpp.conf\fR\fR
399 .ad
400 .sp .6
401 .RS 4n
402 driver configuration file for 64-bit SPARC
403 .RE
404
405 .sp
406 .ne 2
407 .na
408 \fB\fBkernel/drv/amd64/ecpp.conf\fR\fR
409 .ad
410 .sp .6
411 .RS 4n
412 driver configuration file for 64-bit x86
413 .RE
414
415 .SH ERRORS
416 .ne 2
417 .na
418 \fB\fBEBADF\fR\fR
419 .ad
420 .RS 10n
421 The device is opened for write-only access and a read is attempted, or the
422 device is opened for read-only access and a write is attempted.
423 .RE
424
425 .sp
426 .ne 2
427 .na
428 \fB\fBEBUSY\fR\fR
429 .ad
430 .RS 10n
431 The device has been opened and another open is attempted. An attempt has been
432 made to unload the driver while one of the units is open.
433 .RE
434
451 .na
452 \fB\fBEIO\fR\fR
453 .ad
454 .RS 10n
455 The driver encountered a bus error when attempting an access. A read or write
456 did not complete properly, due to a peripheral error or a transfer timeout.
457 .RE
458
459 .sp
460 .ne 2
461 .na
462 \fB\fBENXIO\fR\fR
463 .ad
464 .RS 10n
465 The driver has received an open request for a unit for which the attach failed.
466 The driver has received a write request for a unit which has an active
467 peripheral error.
468 .RE
469
470 .SH ATTRIBUTES
471 .LP
472 See \fBattributes\fR(5) for descriptions of the following attributes:
473 .sp
474
475 .sp
476 .TS
477 box;
478 c | c
479 l | l .
480 ATTRIBUTE TYPE ATTRIBUTE VALUE
481 _
482 Architecture PCI-based systems
483 _
484 ISA-based systems (x86)
485 _
486 Interface stability Evolving
487 .TE
488
489 .SH SEE ALSO
490 .LP
491 \fBmodload\fR(1M), \fBmodunload\fR(1M), \fBupdate_drv\fR(1M), \fBioctl\fR(2),
492 \fBopen\fR(2), \fBread\fR(2), \fBwrite\fR(2), \fBattributes\fR(5),
493 \fBbpp\fR(7D), \fBusbprn\fR(7D), \fBprnio\fR(7I), \fBstreamio\fR(7I)
494 .sp
495 .LP
496 \fIIEEE Std 1284-1994\fR
497 .SH DIAGNOSTICS
498 .ne 2
499 .na
500 \fBParallel port controller not supported\fR
501 .ad
502 .sp .6
503 .RS 4n
504 Driver does not support parallel port controller on the given host. Attach
505 failed.
506 .RE
507
|
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ECPP 7D "Jan 10, 2020"
7 .SH NAME
8 ecpp \- IEEE 1284 compliant parallel port driver
9 .SH SYNOPSIS
10 .nf
11 #include <sys/types.h>
12 .fi
13
14 .LP
15 .nf
16 #include <sys/ecppio.h>
17 .fi
18
19 .LP
20 .nf
21 ecpp@unit-address
22 .fi
23
24 .SH DESCRIPTION
25 The \fBecpp\fR driver provides a bi-directional interface to \fIIEEE 1284\fR
26 compliant devices as well as a forward single-directional interface to
27 Centronics devices. In addition to the Centronics protocol, the \fBecpp\fR
28 driver supports the \fIIEEE 1284\fRCompatibility, Nibble, and ECP protocols.
29 \fBECPP_COMPAT_MODE\fR and \fBECPP_CENTRONICS\fR modes of operation have
30 logically identical handshaking protocols, however devices that support
31 \fBECPP_COMPAT_MODE\fR are \fIIEEE 1284\fR compliant devices. \fIIEEE 1284\fR
32 compliant devices support at least \fBECPP_COMPAT_MODE\fR and
33 \fBECPP_NIBBLE_MODE\fR. Centronics devices support only \fBECPP_CENTRONICS\fR
34 mode.
35 .sp
36 .LP
37 By default, \fBECPP_COMPAT_MODE\fR devices have a strobe handshaking pulse
38 width of 500ns. For this mode, forward data transfers are conducted by DMA. By
39 default, the strobe pulse width for \fBECPP_CENTRONICS\fR devices is two
40 microseconds. Forward transfers for these devices are managed through PIO. The
41 default characteristics for both \fBECPP_COMPAT_MODE\fR and
42 \fBECPP_CENTRONICS\fR devices may be changed through tunable variables defined
43 in \fBecpp.conf\fR.
44 .sp
45 .LP
46 The \fBecpp\fR driver is an \fIexclusive-use\fR device, meaning that if the
47 device is already open, subsequent opens fail with \fBEBUSY\fR.
48 .SS "Default Operation"
49 Each time the \fBecpp\fR device is opened, the device is marked as \fBEBUSY\fR
50 and the configuration variables are set to their default values. The
51 \fBwrite_timeout\fR period is set to 90 seconds.
52 .sp
53 .LP
54 The driver sets the mode variable according to the following algorithm: The
55 driver initially attempts to negotiate the link into \fBECPP_ECP_MODE\fR during
56 \fBopen\fR(2). If it fails, the driver tries to negotiate into
57 \fBECPP_NIBBLE_MODE\fR mode. If that fails, the driver operates in
58 \fBECPP_CENTRONICS\fR mode. Upon successfully opening the device, \fIIEEE
59 1284\fR compliant devices will be left idle in either reverse idle phase of
60 \fBECPP_ECP_MODE\fR or in \fBECPP_NIBBLE_MODE\fR. Subsequent calls to
61 \fBwrite\fR(2) invokes the driver to move the link into either
62 \fBECPP_COMPAT_MODE\fR or the forward phase of \fBECPP_ECP_MODE\fR. After the
63 transfer completes, the link returns to idle state.
64 .sp
65 .LP
66 The application may attempt to negotiate the device into a specific mode or set
67 the \fBwrite_timeout\fR values through the \fBECPPIOC_SETPARMS\fR
68 \fBioctl\fR(2) call. For mode negotiation to be successful, both the host
69 workstation and the peripheral must support the requested mode.
70 .SS "Tunables"
71 Characteristics of the \fBecpp\fR driver may be tuned by the variables
72 described in \fB/kernel/drv/ecpp.conf\fR. These variables are read by the
73 kernel during system startup. To tune the variables, edit the \fBecpp.conf\fR
74 file and invoke \fBupdate_drv\fR(1M) to have the kernel read the file again.
75 .sp
76 .LP
77 Some Centronics peripherals and certain \fIIEEE 1284\fR compatible peripherals
78 will not operate with the parallel port operating in a fast handshaking mode.
79 If printing problems occur, set "fast-centronics" and "fast-1284-compatible" to
80 "false." See \fB/kernel/drv/ecpp.conf\fR for more information.
81 .SS "Read/Write Operation"
82 The \fBecpp\fR driver is a full duplex STREAMS device driver. While an
83 application is writing to an \fIIEEE 1284\fR compliant device, another thread
84 may read from it.
85 .SS "Write Operation"
86 A \fBwrite\fR(2) operation returns the number of bytes successfully written to
87 the stream head. If a failure occurs while a Centronics device is transferring
88 data, the content of the status bits will be captured at the time of the error
89 and can be retrieved by the application program using the \fBBPPIOC_GETERR\fR
90 \fBioctl\fR(2) call. The captured status information is overwritten each time
91 an attempted transfer or a \fBBPPIOC_TESTIO\fR \fBioctl\fR(2) occurs.
92 .SS "Read Operation"
93 If a failure or error condition occurs during a \fBread\fR(2), the number of
94 bytes successfully read is returned (short read). When attempting to read a
95 port that has no data currently available, \fBread\fR(2) returns \fB0\fR if
96 \fBO_NDELAY\fR is set. If \fBO_NONBLOCK\fR is set, \fBread\fR(2) returns
97 \fB-1\fR and sets errno to \fBEAGAIN.\fR If \fBO_NDELAY\fR and \fBO_NONBLOCK\fR
98 are clear, \fBread\fR(2) blocks until data become available.
99 .SH IOCTLS
100 The \fBioctl\fR(2) calls described below are supported. Note that when
101 \fBecpp\fR is transferring data, the driver waits until the data has been sent
102 to the device before processing the \fBioctl\fR(2) call.
103 .sp
104 .LP
105 The ecpp driver supports \fBprnio\fR(7I) interfaces.
106 .LP
107 Note -
108 .sp
109 .RS 2
110 The \fBPRNIOC_RESET\fR command toggles the \fBnInit\fR signal for 2 ms,
111 followed by default negotiation.
112 .RE
113 .sp
114 .LP
115 The following \fBioctl\fR(2) calls are supported for backward compatibility and
116 are not recommended for new applications:
117 .sp
118 .ne 2
119 .na
315 .fi
316 .in -2
317
318 The status register is read-only. The \fBECPPIOC_SETREGS\fR ioctl has no affect
319 on this register. Valid bit values for dsr are: \fBECPP_nERR\fR,
320 \fBECPP_SLCT\fR, \fBECPP_PE\fR, \fBECPP_nACK\fR, \fBECPP_nBUSY\fR. All other
321 bits are reserved and always return \fB1\fR.
322 .sp
323 The control register is read/write. Valid bit values for dcr are:
324 \fBECPP_STB\fR, \fBECPP_AFX\fR, \fBECPP_nINIT\fR, \fBECPP_SLCTIN\fR. All other
325 bits are reserved. Reading reserved bits always return 1. An attempt to write
326 0s into these bits results in \fBEINVAL\fR.
327 .RE
328
329 .SH DEVICE SPECIAL FILES
330 .ne 2
331 .na
332 \fB\fB/dev/lp\fIN\fR\fR\fR
333 .ad
334 .RS 19n
335 x86 only. (Backwards compatibility with former \fBlp\fR(7D) devices.)
336 .RE
337
338 .sp
339 .ne 2
340 .na
341 \fB\fB/dev/printers/\fIN\fR\fR\fR
342 .ad
343 .RS 19n
344 1284 compliant parallel port device special files appears in both namespaces.
345 .RE
346
347 .SH FILES
348 .ne 2
349 .na
350 \fB/kernel/drv/sparcv9/ecpp\fR
351 .ad
352 .sp .6
353 .RS 4n
354 Device driver (SPARC)
355 .RE
356
357 .sp
358 .ne 2
359 .na
360 \fB/kernel/drv/amd64/ecpp\fR
361 .ad
362 .sp .6
363 .RS 4n
364 Device driver (x86)
365 .RE
366
367 .sp
368 .ne 2
369 .na
370 \fB/kernel/drv/ecpp.conf\fR
371 .ad
372 .sp .6
373 .RS 4n
374 Driver configuration file
375 .RE
376
377 .SH ERRORS
378 .ne 2
379 .na
380 \fB\fBEBADF\fR\fR
381 .ad
382 .RS 10n
383 The device is opened for write-only access and a read is attempted, or the
384 device is opened for read-only access and a write is attempted.
385 .RE
386
387 .sp
388 .ne 2
389 .na
390 \fB\fBEBUSY\fR\fR
391 .ad
392 .RS 10n
393 The device has been opened and another open is attempted. An attempt has been
394 made to unload the driver while one of the units is open.
395 .RE
396
413 .na
414 \fB\fBEIO\fR\fR
415 .ad
416 .RS 10n
417 The driver encountered a bus error when attempting an access. A read or write
418 did not complete properly, due to a peripheral error or a transfer timeout.
419 .RE
420
421 .sp
422 .ne 2
423 .na
424 \fB\fBENXIO\fR\fR
425 .ad
426 .RS 10n
427 The driver has received an open request for a unit for which the attach failed.
428 The driver has received a write request for a unit which has an active
429 peripheral error.
430 .RE
431
432 .SH ATTRIBUTES
433 See \fBattributes\fR(5) for descriptions of the following attributes:
434 .sp
435
436 .sp
437 .TS
438 box;
439 c | c
440 l | l .
441 ATTRIBUTE TYPE ATTRIBUTE VALUE
442 _
443 Architecture PCI-based systems
444 _
445 ISA-based systems (x86)
446 _
447 Interface stability Evolving
448 .TE
449
450 .SH SEE ALSO
451 \fBmodload\fR(1M), \fBmodunload\fR(1M), \fBupdate_drv\fR(1M), \fBioctl\fR(2),
452 \fBopen\fR(2), \fBread\fR(2), \fBwrite\fR(2), \fBattributes\fR(5),
453 \fBbpp\fR(7D), \fBusbprn\fR(7D), \fBprnio\fR(7I), \fBstreamio\fR(7I)
454 .sp
455 .LP
456 \fIIEEE Std 1284-1994\fR
457 .SH DIAGNOSTICS
458 .ne 2
459 .na
460 \fBParallel port controller not supported\fR
461 .ad
462 .sp .6
463 .RS 4n
464 Driver does not support parallel port controller on the given host. Attach
465 failed.
466 .RE
467
|