[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hotplug and unloading modules



What causes a module to be "used" and can I find out what is using it?
And is there a way to force a module to be unloaded?

What is happening is jpilot-sync is causing the visor "used" count to
increment which then prevents the modules from unloading:

# lsmod
Module                  Size  Used by    Tainted: P  
visor                  10156   0  (unused)
usbserial              18044   0  [visor]
...
usbcore                49760   1  [visor usbserial usbkbd usb-uhci]


# su moseley -c jpilot-sync
****************************************
 Syncing on device /dev/pilot
 Press the HotSync button now
****************************************
Username is "Moseley"
User ID is 23429
lastSyncPC = 1126013239
This PC = 1126013239
Doing a fast sync.
Syncing DatebookDB
Syncing AddressDB
Syncing ToDoDB
Syncing MemoDB
Syncing ExpenseDB
Syncing Keys-Gtkr
Saved Preferences.prc (Creator ID 'psys') is up to date, fetch skipped.
Finished.

# lsmod
Module                  Size  Used by    Tainted: P  
visor                  10156   1        
                             ^^^^

usbserial              18044   0  [visor]
...
usbcore                49760   1  [visor usbserial usbkbd usb-uhci]

Or another look:

$ diff lsmod.before lsmod.after
1c1
< visor                  10156   0  (unused)
---
> visor                  10156   1 

# rmmod visor
visor: Device or resource busy

How about coldsync?

I can't get coldsync to work at all.  I start it and it sits there and
when I push the hotsync button it tells me to push the hot sync button!

$ coldsync -mb test
Warning: no device on /dev/palm. Sleeping
Warning: no device on /dev/palm. Sleeping
Please press the HotSync button.


-- 
Bill Moseley moseley@hank.org




Reply to: