Linux 2.6 PCI driver module causing kernel panic on remove (rmmod)
I am writing a PCI device driver for an end-user using Linux 2.6 (Gentoo 2006.0), and am having difficlty.
I have a PCI device driver module that causes a kernel panic (dump below), when I rmmod the module (remove). I can build and insert (insmod) the module, detect my board and use the interrupt handler. But, when I rmmod the module, it calls the driver's .remove routine, and then I consistantly get a panic. It is a PCI device that uses shared interrupts, and I believe that this panic happens only when my PCI device shares an IRQ with another device in the system. It appears to be an interrupt-related problem from the dump (below).
Any ideas what I am doing wrong or not doing on remove or in my registered interrupt routine? I have looked at dozens of drivers on my system and modeled my driver like them.....
Is there a certain order I need to call my free_irq(), pci_disable_device(), unregister_chrdev(), and pci_unregister_driver() calls? I tried various different orders and even commented some out and it still panics, which makes me wonder if I am still missing something.
Code: Bad EIP value
<0> KErnel panic - not syncing: Fatal Exception in interrupt
A thousand thanks,