lkml.org 
[lkml]   [1996]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: .98 lp.o not working, .97 OK
>>>>> "Eyal" == Eyal Lebedinsky <eyal@fir.canberra.edu.au> writes:

Eyal> lp.o just says "kernel: lp1 off-line" repeatedly. It does print
Eyal> something after a while (a page every few minutes) but it is
Eyal> useless.

Hallo,

I think this change in 1.3.98 relating the lp-driver isn't right.

The new condition to print the message is
: if ((status & LP_OFFL) || !(status & LP_PSELECD)) {
: printk(KERN_INFO "lp%d off-line\n", minor);
: if (LP_F(minor) & LP_ABORT)
: return rc?rc:-EIO;
and
#define LP_OFFL 0x0008
#define LP_PSELECD 0x10 /* unchanged input, active high */

From my data sheet for a parallel port IC I can fine:

> Bit 3 (of Status Port) nERR -nERROR
>
> The level of the nERROR input is read by the CPU as bit 3 of the Printer
> Status Register. A logic 0 means an error has been detected; a logic 1
> means no error has been detected.

So the statement is true if the printing routine timed out because the
printer requested a stop as we delivered data to fast. But this is no error!

I propose to change the if statemaent in both routines to
if (!(status & (LP_OFFL | LP_PSELECD))) {
to make sure, the printer reports an "error" and "offline". If the printeris
not switched on, both signals will be low too.

Uwe Bonnes bon@elektron.ikp.physik.th-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.062 / U:3.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site