Here is a patch that solves the problem with kernel panic when removing the peak-linux-driver-3.17 on a MPC5200B. If someone else apart from us have experienced that. The patches to peak-linux-driver-3.17 needed to run on MPC5200B are: peak-linux-driver-3.17-mpc5200.patch (DENX) peak-linux-driver-3.17-mpc5200-platform_driver.patch (Sylvain Munaut & MontaVista)
Mattias diff --exclude CVS -uNr peak-linux-driver-3.17/driver/src/pcan_mpc5200.c peak-linux-driver-3.17.modified/driver/src/pcan_mpc5200.c --- peak-linux-driver-3.17/driver/src/pcan_mpc5200.c 2008-02-19 16:06:54.000000000 +0100 +++ peak-linux-driver-3.17.modified/driver/src/pcan_mpc5200.c 2008-02-19 16:06:46.000000000 +0100 @@ -752,7 +752,16 @@ { DPRINTK(KERN_DEBUG "%s: mgt_mscan_cleanup()\n", DEVICE_NAME); - platform_driver_unregister(&mscan_driver); + /* In mgt_mscan_init platform_driver_register is called only once + * for module 1. + * We should only call platform_driver_unregister once and we do it + * for module 1 since it is the last module to cleanup. + */ + if (!(dev->port.mscan.module_num-1)) { + DPRINTK(KERN_DEBUG "platform_driver_unregister(&mscan_driver)\n"); + (void) platform_driver_unregister(&mscan_driver); + } + #if 0 /* seems like it's been freed already */ mgt_mscan_free_irq(dev); _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev