lkml.org 
[lkml]   [1998]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Printer(lp) problem
On Tue, 24 Mar 1998, Anthony DeStefano wrote:


> I have the parallel port, pc hardware, and printer drivers compiled as
> modules and have the appropriate changes made in /etc/conf.modules (the
> alias parport_lowlevel parport_pc). The same setup has worked flawlessly
> since I began using the 2.1 kernels with 2.1.76.
>
> I got the following in my logs when I would go to print "lp:
> driver loaded but no devices found" and a lsmod revealed that parport.o
> and lp.o was loaded but parport_pc.o was not loaded. What I suspected
> (and this was digging deep into what I *think* is suppose to happen) is
> that the lp module was being loaded before the parport_pc module. So I
> removed both modules and loaded them all by hand. Parport.o first, then
> parport_pc.o and finally lp.o. And it worked!
>
> I began to dig deeper. I tried looking through the source but didn't find
> anything (actually I didn't understand most of it) but then I found a fix
> (an ugly one I might add). I edited /lib/modules/2.1.90/modules.dep and
> changed lp.o to depend on parport_pc.o instead of parport.o. It works but
> I believe it isn't the correct fix since it's going to be overwritten by
> depmod.
>
> Now finally my question(s), is this an actual bug in the lp code or is
> this because of kmod? Is my "fix" a legitimate way of fixing this or is
> it just a bad hack?
>
The problem is with kmod - if you load a module with kmod that executes a
request_module() in its initialization, kmod will not load the second
module. I have a patch for kmod that is mostly working, but it enlarges
kmod.c quite a bit, has possible race conditions, and may have some
other subtle bugs I'm not aware of. I'll try to post it tomorrow.
But you can expect parport and scsi to work incorrectly under kmod.
Hopefully, we'll get this ironed out and your hack will be unnecesary


Greg Zornetzer - gaz+@andrew.cmu.edu
"Light shines brightest in the darkest night"
http://www.contrib.andrew.cmu.edu/~gaz



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.059 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site