(please don't hate me for this... :-) There are two obvious problems with the previous patch... 1. From the beginning I tried to verbosely comment the scripts (so they can be self-explanatory and easy to read) and, apparently, I forgot to update the comments in the "uhci.agent" after reorganizing the scripts (to experiment with), so... the comments in /etc/hotplug/pci/uhci.agent are wrong, misleading and confusing (ouch)! 2. Only after posting that previous patch I realised that the way in which the "start" and "stop" events are passed down from policy agents to driver agents was, well, not so good. "start" was passed if a kernel module was already loaded and "stop" was passed if a module was already unloaded. Well, it turns out that the right thing is to handle start/stop in the same (almost) way that add/remove events are handled. The only difference is that, for start/stop, $MODULE is also exported and is the name of the currently loaded kernel module ("-" if none, "#" if undetermined). Now, the final thing that remains for unloading to be complete is reference counting. I tried to do it with bash (by storing counts in *.ref files in the driver directories) and guess what I stumbled to... a race condition! Multiple hotplug events can be processed by the scripts at the same time. So I took it back. Isn't there a way to use modutils programs to play with the module's real refrence counts? It would make things a whole lot easier (and safer).