Re: drivers/char/lp.c fails to detect parallel port.

Mr. Sam (mrsam@concentric.net)
Tue, 31 Dec 1996 15:06:52 -0500 (EST)


On Tue, 31 Dec 1996, Matt Cross wrote:

> Date: Mon, 30 Dec 1996 22:49:15 -0500 (EST)
> From: "Mr. Sam" <mrsam@concentric.net>
>
> Well, my printer works fine under Windoze. No problems whatsoever.
> However, Linux 2.0.25 refuses to detect the presence of the parallel port
> (evidence follows). I looked at the patches for .26 and .27, and I do not
> see anything relating to drivers/char/lp.c, and, since I've got a pretty
> stable system going (except for this problem), I prefer not to patch
> unless it is absolutely necessary.
>
> The driver produces the following message, when initialized:
>
> lp: Driver configured but not interfaces found.
>
> This happens whether I compile lp as a module, or have it in the kernel.
> Writing to any /dev/lp* results in ENXIO.
>
> Looking at the source code, I see that this message is generated when lp
> can't autodetect the parallel port at any known I/O address. After
> running my BIOS config, and booting into Windoze, I see that my parallel
> port, by default, is an EPP, I/O address 0x378.
>
> When I add some debugging messages to see what's going on, the following
> picture emerges: lp.c writes a 00 byte into the I/O port address, then
> reads the I/O port address, expecting a 00 byte, but it gets a FF byte on
> my machine.
>
> I patch lp.c and fool it into thinking that it gets back a 00 byte when it
> pokes 0x378. lp comes up and initializes fine, but, basically, /dev/lp*
> is now just a fancy alias for /dev/null. Whatever I write to that device
> goes into a bit bucket, and the printer stays silent. "tunelp" from the
> Slackware 96 distribution tells me that the printer is out of paper. It
> is not. There's plenty of paper in the printer :-)
>
> Seems as though your parallel port device is really not there when you
> boot Linux. I suspect you have a true Plug and Play BIOS that is not
> configuring the device and expecting the OS to do it. You didn't say
> it, but I would guess you are running Windows 95.
>
> Try looking for something in your BIOS setup screens that say
> something like 'Plug and Play OS' and turn it off. When this is
> turned on, the BIOS only configures devices necessary to boot (namely
> disk drives and video) and leaves the rest up to the OS. Since Linux
> is not (yet) plug-and-play, you need to tell the BIOS to configure
> everything.
>
> -Matt

Thank you!!! That was it. Of course, now I have to configure the UNIX
software, but I'm pretty sure I can handle it now.

> P.S. I just installed Debian 1.2 on my work machine, and I was really
> impressed that the X configuration almost worked out of the box! Not
> only did it figure out what video card I have, it also figured out
> exactly what _monitor_ I had! It didn't get the mouse correct, which
> is the only thing that needed changing.

I recently installed the newest rev of XFree86. Although I had to tell it
which video card I had, that was it. It was sure a nice improvement over
the previous versions, not to mention the fact that this one actually
supports my video cards!

--
MrSam: channel operator - #Sci-Fi/Undernet IRC
       http://www.geocities.com/Area51/6543/