Tim Waugh wrote:
> On Wed, May 17, 2000 at 09:13:14PM +0200, Gunther Mayer wrote:
> > But in 2.3.99 LP_NO_ERROR is not even used !?
> I just took a look at this. Does this patch make things any better?
No, but some light comes through...
Your patch is obsolete for "lp.c" in 2.3.99 as the functionality is included
There your hint"Assume the peripheral received it" can be found too...
In parport_ieee1284_write_compat are two catches:
- Is the peripheral ready yet?
- Is the peripheral upset?
These happen to handle all sorts of printer's behaviour well.
I think this sort of policy is probably wrong at this generic place,
as IEEE1284 does not mandate this behaviour.
That code is necessary because, after sending a byte,
we never look for a BUSY or ACK signal from the printer ("assume..." from above).
So we would just blow the bytes out...
There are printers (e.g. DJ500) that twiddle the status lines
even when switched-off (!) to:
lp0 printer-error off-line (0x87)
Only after disconnecting the printer cable you get the "normal" conditions,
that other printers show when switched-off (e.g. LJ1100):
lp0 printer-not-ready ack-active out-of-paper (0x7f)
Indeed we could easily miss BUSY or ACK as their deassertion is not handshaked.
An "inb/outb" on 8MHz ISA takes 750ns (375ns with ZWS(Zero Wait State),
1400ns measured with TSC on my PIII, is this beast running ISA at 4.33 MHz !?).
This explains where IEEE1284 compatibility mode handshake
took it's timing constants from :-)
So the port is deliberately slowed down by many obsolete "udelay(1)"s in the code
(just for ISA-ZWS or PCI you would need "nanodelay(375)"
or "nanodelay(whatever-for-PCI)") !
But beware of even older printers that have arbitrary timings (e.g. Centronics
Standard Timing in Annex C of IEEE1284 prefers 1000ns, ...)
So LP_CAREFUL is indeed obsolete for 2.3.99, and I will redo my patch...
-- To unsubscribe, send mail to: firstname.lastname@example.org --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Thu May 18 2000 - 16:53:55 EDT