Re: Prevent driver module unloading.

On Mon, Oct 21, 2002 at 12:56:45PM +1000, SCoTT SMeDLeY wrote:
> Hi all,
> 
> I've been successfully using a moderately old version of Comedi (0.7.60-cvs)
> for some time now, however, I have one small annoyance.
> 
> Whenever I stop using the card for a bit the drivers/modules *appear*
> to unload themselves & I can't run my user-space app. I say "appears"
> because if I do a lsmod I get this:
> 
> Module                  Size  Used by
> ni_pcimio              19088   0 (autoclean) (unused)
> mite                    3776   0 (autoclean) [ni_pcimio]
> comedi                 15888   0 (autoclean) [ni_pcimio]
> 
> where "(unused)" above appears after ~10 minutes & my app then can't open()
> the /dev/comedi0 device until I run 'comedi_config /dev/comedi0 ni_pcimio'
> again.
> 
> Is there any way to force the driver to stay loaded?

If you use modprobe to load a driver, it is supposed to stay loaded.
If it doesn't, it's a bug in your distribution (probably).  I'm not
sure how to fix it, but the symptom is that insmod is called with
the -k flag.

I prefer to add module autoloading lines to /etc/modules.conf; an
example of how to do this is in INSTALL.  That way, the driver gets
loaded and unloaded automatically.



dave...

Received on 2002-10-21Z02:23:30