From: Ian Jackson Subject: Re: [PATCH V3 3/6] libxl: add pvusb API Date: Thu, 11 Jun 2015 17:54:03 +0100 Message-ID: <21881.48427.639023.140243@mariner.uk.xensource.com> References: <1429415452-6161-1-git-send-email-cyliu@suse.com> <1429415452-6161-4-git-send-email-cyliu@suse.com> <20150518180724.GH9503@zion.uk.xensource.com> <555B1C8B02000066000C774B@relay2.provo.novell.com> <20150520090407.GW26335@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150520090407.GW26335@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: lars.kurth@citrix.com, ian.campbell@citrix.com, george.dunlap@eu.citrix.com, Chun Yan Liu , xen-devel@lists.xen.org, caobosimon@gmail.com List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("Re: [PATCH V3 3/6] libxl: add pvusb API"): > On Mon, May 18, 2015 at 09:20:43PM -0600, Chun Yan Liu wrote: > > Thanks, I'm updating that. But maybe like pci_add and pci_remove functions, > > will add a 'starting' flag to indicate hotplug or creation. > > Looking at DEFINE_DEVICE_ADD and DEFINE_DEVICE_REMOVE, usbctrl_add > > and usb_add can use DEFINE_DEVICE_ADD; but usbctrl_remove and usb_remove > > cannot use DEFINE_DEVICE_REMOVE directly, need some extra handling. So, > > finally turned to not use these macros but refer to pci functions. > > TBH I prefer to have only one way to deal with devices. I personally > prefer the async style that every other devices use. Maybe that's just > because I mostly worked with those. > > I don't know the full history of libxl_pci.c so I will wait for Ian and > Ian's comments on which way to go. libxl_pci.c is rather unfortunate in a few respects. It does a number of things things synchronously that it shouldn't. Certainly the external API for all device add/remove functions should be async. Ian.