qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del com


From: Shahar Havivi
Subject: [Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del command
Date: Wed, 26 May 2010 11:48:11 +0300
User-agent: Mutt/1.5.20 (2009-08-17)

On Tue, May 25, 2010 at 10:58:50AM +0200, Gerd Hoffmann wrote:
> Date: Tue, 25 May 2010 10:58:50 +0200
> From: Gerd Hoffmann <address@hidden>
> To: Shahar Havivi <address@hidden>
> CC: "David S. Ahern" <address@hidden>,
>       Markus Armbruster <address@hidden>, address@hidden
> Subject: Re: [PATCH] Release usb devices on shutdown and usb_del command
> 
> 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
> 
We can add at exit to the first device that added in usb-linux.c via
usb_host_device_open() or usb_host_initfn() and the exit will iterate
all usb devices in linux only,
How is that solution?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]