From: <man...@wi...> - 2004-12-21 13:28:54
|
Hi, <Stephen Hemminger> wrote: > In most cases, a driver should not be doing module_get/put on 2.6. > This allows driver to be removed at any time for hotplug support. > Where it makes sense is when doing something with an indirect pointer > table (like ieee80211 looking up crypto modules). Agreed, the lower most drivers should not be doing a try_module_get or a module_put in itself. My device however is not a hot-pluggable device, but I would like to dynamically load and unload the lower layer irda driver. If I am not using try_module_get in my lower layer driver, the issue that I am facing is: When the irda0 (in my case) is up and data is under transmission and I do an rmmod of the lower layer driver, the driver is being removed (the transfer stops meanwhile). This does not seem to be a proper behavior (If this is an expected behavior, could some one explain why this is so?). I would rather expect the rmmod to tell me that the module is busy and refuse to remove the module. Regards, Manjunath |