$ dd if=/dev/zero of=/dev/lp1 bs=1024k count=1
This locks up the machine for about 10 seconds (console switching works,
though). The appended patch fixes the problem -- it checks whether it's
necessary to call the scheduler every time before printing a character just
like the polling version of the lp-driver does. The patch was made against
2.0.29 with Carsten Gross' IEEE1284-readback-support, but it works with
plain 2.0.29 and 2.1.x as well (with a little offset).
BTW, it would be really nice to have IEEE1284 ECP support for Linux,
because modern printers are definitely capable of accepting more than
100kB/s (and they also shouldn't suck up your whole CPU :-). Anybody
working on this?
Martin
--- drivers/char/lp.c.notfixed Thu Apr 3 15:38:03 1997
+++ drivers/char/lp.c Thu Apr 3 15:44:15 1997
@@ -117,6 +117,8 @@
struct lp_stats *stats;
do {
+ if(need_resched)
+ schedule();
if ((status = LP_S(minor)) & LP_PBUSY) {
if (!LP_CAREFUL_READY(minor, status))
return 0;
-- /* Martin Buck E-Mail: martin-2.buck@student.uni-ulm.de */ /* Student of electrical engineering WWW: http://www.uni-ulm.de/~s_mbuck1/ */ /* University of Ulm, Germany Snail-Mail: Paukengasse 2, 89077 Ulm, Germany */ #include <disclaimer.h> /* PGP Key available MIME-Mail welcome */