Re: parport patch / lp_readback

Carsten Gross (
Tue, 22 Apr 1997 01:40:42 +0200 (MET DST)

On April 22. you wrote:
> > - Have you tested the IRQ driven lp-driver? I think this could be a problem.
> > I've added a 'if (LP_IRQ(minor)) return -EINVAL;' to the code. Perhaps
> > this is not necessary?
> Can you explain why you think it's necessary? Perhaps I'm just being dim.

I think it is possible that the "acknowledge" line from the printer port
could be a problem. During normal printing every (beat me: it's something with
the rising or falling edge of the signal...) acknowledge from the printer
generates an interrupt. But the readback uses the acknowledge line too and
at the moment there is no code to handle the interrupts during reading.
Theoretically this is a problem, but I'm not sure because a simple
reprogramming of the control register disables the interrupts. But I'm not
able to test it, because I've the printer interrupts disabled.

Your other question about reading the status during writing: At the moment
of "reading" you are unable to write because the 'SelectIN' line sets the
printer offline. The same for writes: During a 'write' SelectIN commands the
printer to be "online". A 'read' operation not respecting this would print
at least an ascii NULL character. With a flag it is possible to control this
problem but it is (a little bit) sophisticated and means changes distributed
over the whole lp driver.


Carsten Gross		Internet:
Wohnheim Heilmeyersteige:  Sebastian Kneipp Weg 6, 89075 Ulm