Hi,

On 05/02/2012 12:33 PM, Pete Batard wrote:
> On 2012.05.02 09:28, Hans de Goede wrote:
>> The problem is that with usb device redirection we can have 1 device
>> already redirected, and then the user asks to redirect another device
>> to the virtual machine, so we install a driver for the other device,
>> and then need to be able to use the other device without re-init
>
> I see.
>
> Still, installing a driver and expecting libusbx to be in a state to use
> the device is pretty much akin to hotplug on Windows, as you are
> transitioning from a device that didn't have a supported driver and thus
> was inaccessible to libusbx as if it wasn't plugged in, to a device that
> is now accessible with a supported driver, i.e. as if it had been
> plugged in.

Well you've hotplug and hotplug, what is expected by spice is that after
it detects a hotplug itself (through platform dependent code) that it can
then do a new libusb_get_device_list() call and the new device will be
there. So we're not asking for true hotplug, just that when we ask to
re-enumerate devices we get an updated device list. This is how things
currently work on other platforms.

> Given the choice, I'd rather work on kickstarting the libusbx 2.0 branch
> and apply the hp patches I have in -pbatard, but it may take a while...

TBH I'm not convinced that adding hotplug requires an ABI / API break,
and if possible I would like to avoid that. I'm fine with having a
devel and stable branch, but I would like to avoid declaring the devel
branch a do whatever you want to the API/ABI area.

What I propose is that whenever we are thinking about a feature which
may need API breakage, we first design the API for that feature, without
taking compatibility in mind, so we assume API breakage is ok for the
initial design. And then we do an iteration where we try to see if we
can make it fit with the current API, if we can -> hurrah. If we cannot
then we've a good reason to start an API incompat branch.

This is also the procedure I would like to follow with hotplug.

Regards,

Hans

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to