parport patch / lp_readback

Carsten Gross (carsten@sol.wohnheim.uni-ulm.de)
Tue, 22 Apr 1997 00:50:22 +0200 (MET DST)


On Mar 15 you and myself wrote:
> > your patch and it looks very interesting. I'm just using a printer on lp0
> > and if you like, I could convert my improved readback code to fit into your
> > `parport' project - I saw, you've renamed some macros and you have added a
>
> Yes, that would be handy. Take a look at lp.c from the latest 2.1.29
> patch and make whatever changes to the readback code you want. The
> IEEE1284 ID probe doesn't live there any more though, it's now in
> parport_probe.c.

Hello Philip (and to everyone on the list),

Thanks a lot for your work. Unfortunality I've had very much to do the last
few weeks and I was not able to follow the development "on the bleeding
edge". But now I've downloaded the new code up to 2.1.34 and I'm happy to
add some lines to the code. I've just a few questions or comments about the
code. I would be glad to hear your comments.

My questions are:
- 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?

- Is "blocking IO" a good choice? This means a read from the device
with no data available "hangs" (for example the simple 'cat'). If you add
a 'fcntl(fildes, F_SETFL, O_NONBLOCK)' in an user program, a read from the
device with no outstanding data returns EAGAIN. At the moment this is my
choice and this is different to the old version.

Thanks a lot for your help and comments.

Ciao

Carsten

-- 
Carsten Gross		Internet: carsten@sol.wohnheim.uni-ulm.de
Wohnheim Heilmeyersteige:  Sebastian Kneipp Weg 6, 89075 Ulm