On 05/21/10 19:55, Shahar Havivi wrote:
Remove usb_host_device_release and using usb_host_close to handle usb_del command. Gerd, What do you think about the usb_cleanup()?
We need a mechanism to handle this for sure. I don't like that usb-specific approach very much though.
I think we should either do that at qdev level, then at exit walk the whole device tree and call cleanup functions (if present). So every device has the chance to do cleanups when needed.
Or we could have a exit notifier, which can be used for device (and also other) cleanup work.
I tend to think that a exit notifier will be better. We probably have only a few devices which actually have to do some cleanup work (usb passthrough, maybe pci passthrough too), so building qdev infrastructure for that feels a bit like overkill. And exit notifiers are more generic, i.e. it will also work for non-device stuff.
cheers, Gerd