removing modules afetr ejecting a card?

Steven Scholz steven.scholz at imc-berlin.de
Wed Jul 20 07:34:18 EDT 2005


Hi,

/etc/hotplug/pcmcia.agent is loading the approriate modules with

	modprobe $MODALIAS

(and MODALIAS would be something like 
pcmcia:m0045c0401f04fn00pfn00pa7A954BD9pb91844B1CpcAAC4295Bpd00000000)

But I noticed that the modules (like ide_cs etc.) are _not_ unloaded when the 
card is removed. Thus when I am inserting and removing several cards then the 
modules stay loaded just wasting precious recources...

How could I unload these modules when the card is removed?

I tried to add a

	modprobe -r $MODALIAS

in the "stop" sections of /etc/hotplug/pcmcia.agent. But since ide-cs.ko depends 
on pcmcia.ko (according to /etc/modules.dep) the pcmcia.ko module is removed as 
well! (Same goes for other drivers like orinoco_cs)
But removing pcmcia.ko means that pcmcia is not working anymore. No more card 
insertions/removals are detected.

How could I work around this problem?
Is it possible to install pcmcia.ko a system boot there a way that it will not 
be removed later?

Thanks a million!

--
Steven









More information about the linux-pcmcia mailing list