I have an iPod which connects fine to my box, however I cannot unload the module until the iPod is physically disconnected, which seems to be the wrong way of doing things! I am running udev and hotplug, though I have now put the sbp2 module into the blacklist, and have this file: Code: root@moose hotplug # cat /etc/gtkpod/gtkpod.in sudo /sbin/modprobe sbp2 sleep 1 (i had to put the sleep in to enable the module to load, and for udev to create the symlink to /dev/ipod.) So now I fire up gtkpod and all is well. But after I have synced, if I quit from gtkpod, it cannot unload the module, here is gtkpod.out: Code: root@moose hotplug # cat /etc/gtkpod/gtkpod.out sudo /sbin/rmmod sbp2 I end up with an iPod with the "Do no disconnect" message flashing at me. Trying a manual modprobe (or rmmod) doesn't work: Code: root@moose hotplug # modprobe -r sbp2 FATAL: Module sbp2 is in use. or Code: root@moose hotplug # rmmod sbp2 ERROR: Module sbp2 is in use If I check which modules are using which, sbp2 is annoyingly coy about telling me which module is using it, or what is using it: Code: root@moose hotplug # lsmod Module Size Used by sbp2 21256 1 vfat 11520 1 fat 39232 1 vfat How is it that this module will not unload? Modprobe -f doesn't unload it. I have compiled into the kernel force module unloading, and still I cannot unload this module. Reproducible: Always Steps to Reproduce: 1.boot machine 2.module loads 3.modprobe -r sbp2 4. Actual Results: get message, "module sbp2 is in use" Expected Results: Unloaded the module moose root # emerge info Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.8-rc3) ================================================================= System uname: 2.6.8-rc3 i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apache apm arts avi berkdb bonobo cdr crypt cups dga dvd encode esd fbcon foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 imlib java jpeg ldap libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pda pdflib perl png ppds python qt quicktime radeon readline sdl slang spell ssl svga tcpd tetex truetype usb x86 xml2 xmms xv zlib"
A process is still using it. Try lsof [You might need to merge it] and look for what is using that device.
Closing due to lack of needed information, please see comment #1.
The library is /lib/modules/2.6.8-rc3/kernel/drivers/ieee1394/sbp2.ko, running 'lsof | grep sbp2' does not return anything. How do you use lsof to check module use? When I run lsof, it doesn't show ANY of my modules as being 'open'??
Which /dev node does it run through (assuming it works that way)? If it was /dev/abc1 then you would do "lsof | grep abc1" to see what is using it.
Please reopen bug with requested information