card bus hot plug features
From: gopan (gop_kumar_at_hotmail.com)
Date: 01/30/04
- Next message: Josef Möllers: "Re: Reading from an existing entry in /proc"
- Previous message: Kilian A. Foth: "Re: QUESTION: shared libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2004 06:39:46 -0800
Hi everybody,
I am working with a card bus device and need to load
and unload my module as and when the device is inserted and ejected on
the fly.
I have used the macro MODULES_DEVICE_TABLE so that the modules.pcimap
will have info abt the device. Now, when the card is inserted, my
module gets loaded but when it is ejected, the module is not unloaded.
When I went thru the pci.agent file, I saw a section for card
insertion event called "add)" where it was observed that to load the
module there is the script
"load_drivers pci $MAP_CURRENT $LABEL"
but there was no remove) section.
So, i created a remove) section and duplicated the contents of add)
there, the only change being instead of load_drivers i used
"unload_drivers pci $MAP_CURRENT $ LABEL"
Obviously there is some error in my remove) section, but I am sure on
card removal, this section is getting called as, when i put a "rmmod
mymodule.o" statement there (mymodule being the name of my module), it
gets unloaded!
What is the actual way of performing the unload? as putting rmmod is
not a solution. Any help/suggestions or sample scripts would be great
regards
Gopkumar
- Next message: Josef Möllers: "Re: Reading from an existing entry in /proc"
- Previous message: Kilian A. Foth: "Re: QUESTION: shared libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|