Subject: Re: Printing to LPT0 - Sun Ultra 5 - sparc64
To: <>
From: Rafal Boni <rafal@attbi.com>
List: port-sparc64
Date: 12/02/2002 17:18:22
[...Following up to myself...]

In message <200212010128.gB11Srd12639@fearless-vampire-killer.waterside.net>,
I wrote thusly:

-> In message <000501c29374$07394b80$6601a8c0@caldwell>, you write: 
-> 
-> -> Is printing to the parallel port (lpt0) supported in NetBSD sparc64 - on 
-> a
-> -> Sun Ultra 5?
-> 
-> So I tried after Martin's addition of the lpt driver major numbers to the
-> system, and get the following results:
-> 	(1) Using /dev/lpa0: nothing seem on printer, haven't yet hooked 
-> 	    up the breakout box to see if signals are being twiddled or 
-> 	    not; the printing job looks like it thinks it's done quite
-> 	    quickly.

This appears to be a timing issue, as the driver actually believes that
all the bytes have been pushed out.  I noticed there are some DELAY(1)'s
in the lpt.c code and recall that a few ports had off-by-one errors in 
their DELAY() macros or delay() functions so a DELAY(1) was in effect a
no-op... I'll check this out, but otherwise it looks like it's going to
have to be down-and-dirty tweaking until things work.

-> 	(2) Using /dev/lpt0: printer starts up and makes some noises, looks
-> 	    like it's going to print but never[*] gets to the point of 
-> 	    producing any output.

Here, the problem is that no interrupts are generated.  I didn't have the
SuperIO docs on hand when playing with this last night, so I'm not sure if
we simply don't set up enough registers for interrupts to be generated, or
if there are other issues of some kind...

I still haven't tried the printer with new cable and x86 machine (because
the x86 box is still packed 8-), but would expect it all to still work
since it did so before all this stuff was packed up in August.

--rafal

----
Rafal Boni                                                     rafal@attbi.com
  We are all worms.  But I do believe I am a glowworm.  -- Winston Churchill