Messages in this thread |  | | Date | Mon, 13 May 1996 20:19:41 +0200 | From | Uwe Bonnes <> | Subject | Testers wanted: Parallelport Enhancements |
| |
Hallo,
many newer motherboards have a FIFO for use with the Parallelport. This FIFO reliefs the CPU from doing the software handshake by doing hardware handshake by itself. There is a standard register layout for these additional registers, so probing for these registers can be done without knowing the special hardware. Using this fifo is known as "Fast Centronics" or so.
I have extended drivers/char/lp.c to use this feature, where available. This improves writing in the High speed mode of a Laserjet 4 Plus: bash# time dd if=/dev/zero of=/dev/lp1 bs=1k count=1k (without FIFO) 0.00user 11.11system 0:11.17elapsed 99%CPU bash# time dd if=/dev/zero of=/dev/lp1 bs=1k count=1k 0.00user 0.69system 0:08.13elapsed 8%CPU (with FIFO)
Here the data for the standard speed of a HP Laserjet 4 Plus: bash# time dd if=/dev/zero of=/dev/lp1 bs=1k count=100 (without FIFO) 0.00user 1.92system 0:02.06elapsed 93%CPU bash# time dd if=/dev/zero of=/dev/lp1 bs=1k count=100 0.00user 1.24system 0:01.27elapsed 97%CPU (with FIFO *) bash# time dd if=/dev/zero of=/dev/lp1 bs=1k count=100 0.00user 0.41system 0:01.27elapsed 32%CPU (with FIFO and Interrupt)
(* timeout set to 0 )
If you are interessted to test this extension, please let me know. I need testers with old hardware too, to test compatibility.
I will send you these following files: lp.c, lp.h and tunelp-1.3/tunelp.c. Best is to have lp as a loadable modules. With the modified tunelp, you can enable the usage of the FIFO. > bash# /home/bon/tmp/tunelp-1.3/tunelp /dev/lp1 -f on > /dev/lp1 using polling on fifo
The availability of a FIFO is reported when inserting the driver: > May 13 19:53:10 elektron kernel: lp1 at 0x0378 has ECP-Mode(polling) > May 13 19:53:10 elektron kernel: lp2 at 0x0278 (polling)
If you have a IEEE1284 compatible device connected to you Parallelport, which allows mode-negotiation, the result of this negotiation will be printed when opening /dev/lpx. I don't have such a device.
-- Uwe Bonnes bon@elektron.ikp.physik.th-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
|  |