somebody is holding a reference to your device, either through your modules use of the MOD_INC_USE_COUNT macro (which I believe is depricated), or through the use of one of the macros that the kernel uses to prevent module remove race conditions (dev_hold is the only one that jumps to mind at the moment). You can only get the module to remove by balancing the MOD_INC/DEC macros, or massaging your kernel to release any references to your module. However, after an oops, its usually best practice to reboot, lest you run a kernel with corrupted memory somewhere.
Kernel folks,
I am in the process of porting a Sun Solaris PCI bus driver
that I wrote over to a 2.4 kernel, and I could use a mentor
just to get me over the initial bumps.
I have a module that can be loaded, and detects my card, and
responds to ioctl() calls properly, so I'm moving right along,
but I do have some problems now.
1) If I "oops" in my module, I cannot unload it with:
# /sbin/rmmod sse sse: Device or resource busy
I don't believe you call the operation in a pci_ops structure directly. check the kernel for references to pci_[read|write]_config_[byte|word|dword] instead.
I have only figured out that a reboot cleans things up again.
2) An example of using pci_ops read_dword() would be superb.
By the way, this development environment is really slick
compared to Solaris. When I "oops" in Solaris, the kernel
panics and I'm in for a messy fsck on the way back up. This
is a great improvement.
Thanks in advance for any help any of you may provide.
After this, there will be one more Linux PCI bus driver developer
in the world, and that can't be a bad thing.
-Alan