Subject: Re: Volunteer(s) needed to test mvme147 lpt driver
To: Steve Woodford <steve@mctavish.demon.co.uk>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mvme68k
Date: 07/15/1996 11:16:39
On Mon, 15 Jul 1996 14:11:07 +0000 (BST)
steve@mctavish.demon.co.uk (Steve Woodford) wrote:
> Hello all,
Hi Steve...
> I've just finished a parallel port driver for the mvme147, based on a
> couple of the other NetBSD lpt drivers I found lying around. It has
> been written to work with the latest source so I doubt it'll compile
> with 1.1.
lpt driver, way cool :-)
> Only one problem... I can run up a kernel with the driver linked in,
> and access the device without any problems, but I don't have a printer
> I can test with! (I loaned it to my sister for her university work)
>
> So, if some kind/brave soul with a printer could try this out and let
> me know the results. Better still, if it doesn't work you can hack the
> code to fix it!
I can't really test the driver, either, since I don't have anything to
plug into the port (though, I could have my folks ship me an old Okidata
printer I'm storing in their attic :-)
Anyhow, I do have some stylistic/architectural suggestions...
In lptreg.h, don't declare a global "LPT" pointer to the register union.
In the places where's it used, you have the softc available. Probably
better to just carry the pointer to the registers in the softc and
reference them that way. No functional difference, just slightly better
style. It's a nit :-)
Also, every device with a devsw entry should get a "needs-flag". In the
case of the lpt driver, you really need to use NLPT in the cdevsw entry.
"needs-flag" just generates a "1" or "0" based on whether or not the
driver is included in the kernel. The macros that expand to the switch
table rely on this number being accurate. With the conf.c below, a
kernel without the lpt driver will fail to link because the "1" forces
the macros to generate references to the non-existent driver entry points.
Anyhow, these are just trivial little nits... I think it's totally cool
that you did this :-)
-- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ --
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939