qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shahar Havivi <shaharh@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	"David S. Ahern" <daahern@cisco.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] Release usb devices on shutdown and usb_del command
Date: Wed, 26 May 2010 11:48:11 +0300	[thread overview]
Message-ID: <20100526084810.GB26055@redhat.com> (raw)
In-Reply-To: <4BFB914A.3050903@redhat.com>

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 <kraxel@redhat.com>
> To: Shahar Havivi <shaharh@redhat.com>
> CC: "David S. Ahern" <daahern@cisco.com>,
> 	Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
> 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	other threads:[~2010-05-26  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 18:10 [Qemu-devel] [PATCH v2] Release usb devices on shutdown and usb_del command Shahar Havivi
2010-05-19 18:43 ` David S. Ahern
2010-05-21  6:33   ` Markus Armbruster
2010-05-21  6:51     ` Gerd Hoffmann
2010-05-21 17:55       ` [Qemu-devel] Re: [PATCH] " Shahar Havivi
2010-05-25  8:58         ` Gerd Hoffmann
2010-05-26  8:48           ` Shahar Havivi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100526084810.GB26055@redhat.com \
    --to=shaharh@redhat.com \
    --cc=armbru@redhat.com \
    --cc=daahern@cisco.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).