Hi Umang, Am 15.03.24 um 11:56 schrieb Umang Jain:
The series addresses the following TODO item: ``` * Fix kernel module support Even the VPU firmware doesn't support a VCHI re-connect, the driver should properly handle a module unload. This also includes that all resources must be freed (kthreads, debugfs entries, ...) and global variables avoided. ``` Patch 1/5 to 3/5 are log cleanups spotted during the reading of the driver. Patch 4/5 implements .remove() function vptr so that individual devices(bcm2835-audio, bcm2835-camera, bcm2835-isp etc.) can run their cleanup when removed from the vchiq_bus, during their own module unload. Patch 5/5 stops the kthreads started by vchiq - on shutdown path. Rest of the module cleanup (debugfs entries, deregister char device etc.) is already done as part of vchiq_remove().
great work!
Testing on RPi4 for vchiq module unload: ``` uajain@ATX:~$ uname -r 6.8.0-rc1-00128-gab2b09f632fa-dirty uajain@ATX:~$ dmesg | grep vchiq [ 21.401426] vchiq: module is from the staging directory, the quality is unknown, you have been warned. uajain@ATX:~$ sudo modprobe bcm2835_mmal_vchiq sudo: unable to resolve host ATX: Temporary failure in name resolution uajain@ATX:~$ dmesg | grep vchiq [ 21.401426] vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 96.388148] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. uajain@ATX:~$ lsmod | grep vchiq bcm2835_mmal_vchiq 40960 0 vchiq 581632 1 bcm2835_mmal_vchiq uajain@ATX:~$ sudo rmmod bcm2835_mmal_vchiq vchiq sudo: unable to resolve host ATX: Temporary failure in name resolution uajain@ATX:~$ lsmod | grep vchiq uajain@ATX:~$ dmesg | grep vchiq [ 21.401426] vchiq: module is from the staging directory, the quality is unknown, you have been warned. [ 96.388148] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned. uajain@ATX:~$
What happens if you run "sudo modprobe bcm2835_mmal_vchiq" again?