Subject: Re: IBM PC Server
To: NetBSD/i386 Discussion List <port-i386@netbsd.org>
From: David Burgess <burgess@mitre.org>
List: port-i386
Date: 06/28/2001 11:00:58
"Greg A. Woods" wrote:
> 
> [ On Wednesday, June 27, 2001 at 09:28:40 (+0200), Thomas Michael Wanka wrote: ]
> > Subject: Re: IBM PC Server
> >
> > IIRC LPT1 was at 0x378 at IRQ 7, LPT2 at 0x278 at IRQ 5, and
> > LPT3 at 0x3BC at IRQ 7.
> >
> > IIRC it works something like this: if 3BC is there and no 378 it is
> > treated as LPT1, if 378 is present it will be LPT3. But I might be
> > totally wrong.
> 
> That's more or less exactly what the "Hardware Bible" says, though they
> don't say what IRQ the monochrome adapter port is usually at, they just
> say that the first port is IRQ 7 and the second port is IRQ 5.
> 
> > I have one PC with onboard LPT and MGA that runs NetBSD (but
> > there is no printer attached it works as a firewall machine).
> 
> That config should still work with my suggested:
> 
>   lpt0  at isa? port 0x3bc irq 7        # monochrome parallel port
>   lpt0  at isa? port 0x378 irq 7        # standard PC parallel ports
> 
> except of course the onboard LPT won't be configured unless you build a
> custom kernel.

You also run afoul of having two lpt0 devices if you have both ports
installed.  For this to work, wouldn't you need to independently
identify the devices as lpt0 and lpt1?

> 
> > And one of my customers has  a printserver with 3LPTs and 3 high
> > speed dot matrix printers attached (DFX5000 ?). There is no
> > network interface for these printers available and the data they have
> > to spool can be rather large, so a "small" print server is out of
> > question.
> 
> That sounds like a custom configuration....
> 
> Do you know if they're using ISA printer cards, and which IRQs they're
> using, if any?
>

It shouldn't need a custom configuration; the existing polled device
drivers should be able to keep up, and as long as the spool directory is
big enough, you should be able to just fire it up and go.  Of course,
that assumes you are running the three LPTs on the 'standard' ports.  

To access the polled devices (just because no one has pointed it out)
you use the /dev/lpa* devices.
 
> > I do not know what OS is used (netware 312 or
> > something), it was just to demonstrate some of such machines do
> > exist in the wild.
> 
> I didn't really mean to suggest that they didn't exist, but rather only
> to say that they would be the exceptions and a GENERIC kernel configured
> as I suggest will still boot on them, but just not provide access to all
> the parallel ports.

I'm not really trying to argue, but as I said yesterday, the polled
device is a perfectly reasonable way to set up the printers on this
system.  I always pull the IRQ7 off of my kernel configurations because
I find that the polled device works at least as well as the interrupt
driven device.  I've never found a performance issue, and I've set up
dozens of these machines with and without printers.  I'd even go so far
as to say that some parallel printers don't work reliably as LPT devices
(several PostScript printers come to mind; I'd need to dig for more
detail).

Also, the CUPS printing system now recognizes out polled (lpa) devices
as well as the Int driven (lpt) devices.