Re: [PATCH v2 0/2] Support UsbDk backend

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

 



On Fri, Jun 12, 2015 at 12:47 PM, Fabiano Fidêncio <fabiano@xxxxxxxxxxxx> wrote:
> Kirill,
>
> On Thu, Jun 11, 2015 at 2:53 PM, Kirill Moizik <kirill@xxxxxxxxxx> wrote:
>>  Hi,
>> What do you think about those patches, guys ?
>
> The patches are not ready to get merged yet.
> I didn't go through a code review, just did some simple functional
> tests and I found some problems in the current scenarios:
>
> 1) Only usbclerk is installed in the system:
>
> Steps to reproduce:
> - Install virt-viewer
> - Install usbclerk
> - Connect to a machine using the new installed RemoteViewer
>
> You will see a crash that a crash happens. The backtrace clearly
> points to usbdk code:
>
> #0  0x00000000 in ?? ()
> #1  0x00df8b5c in usbdk_get_device_list (ctx=0x1cbdda8, _discdevs=0x22f43c)
>     at ../../libusb/os/windows_usbdk.c:342
> #2  0x00df21fc in libusb_get_device_list@8 (ctx=0x1cbdda8,
>     list=list@entry=0x22f498) at ../../libusb/core.c:825
> #3  0x00d34245 in g_udev_client_list_devices (self=self@entry=0x1c9aa50,
>     devs=devs@entry=0x1c9aa48, err=err@entry=0x0,
>     name=name@entry=0xdc600b <__FUNCTION__.107435>
> "g_udev_client_initable_init") at ../../gtk/win-usb-dev.c:139
> #4  0x00d346ee in g_udev_client_initable_init (initable=0x1c9aa50,
>     cancellable=0x0, err=0x0) at ../../gtk/win-usb-dev.c:201
> #5  0x6d7a96df in ?? ()
>    from C:\Program Files\VirtViewer v2.0-16\bin\libgio-2.0-0.dll

Hmm. Doing a simple test here shows that usbdk_helper.GetDeviceList() is NULL.
Looking a bit to the libusb patches, seems that once its compiled
using --enable-usbdk, there is no fallback for using winusb code in
case UsbDk is not installed.
Is this the case? Wouldn't be better to have a fallback code?

>
> 2) Only usbdk is installed in the system:
>
> Steps to reproduce:
> - install virt-viewer
> - install usbdk
> - Connect to a machine using the new installed RemoteViewer
>
> You will see that, in remote-viewer, the menu item "USB device
> selection" is grayed out. It happens due to the last patches from
> Marc-André in spice-gtk for
> https://bugzilla.redhat.com/show_bug.cgi?id=857087.
>
> 3) Both usbdk and usbclerk installed
>
> Steps to reproduce:
> - install virt-viewer
> - install usbdk
> - install usbclerk
>
> This is the only way it kinda works, but shows some errors about
> missing a .dll and some weird message about a not used version of
> virt-viewer (still related to missing .dlls). This problem probably is
> not related to your patches, but may be ... so I'm mentioning it here
> while I go deeper in the investigation.
>
> Anyways, 1 and 2 must be fixed before merging the patches.
>
>> Kirill
>>
>> On Tue, Jun 9, 2015 at 3:53 PM, Kirill Moizik <kirill@xxxxxxxxxx> wrote:
>>>
>>> From: Kirill Moizik <kirillm@xxxxxxxxxx>
>>>
>>> UsbDk (USB Development Kit) is a set of software components meant to
>>> provide
>>> Windows user mode applications with direct and exclusive access to USB
>>> devices.
>>>
>>> Some distinctive UsbDk properties are:
>>>
>>> 1. UsbDk supports all types of devices and interfaces - bulk, isochronous,
>>>    composite, HID etc.
>>> 2. Device capture process is totally dynamic, i.e. no inf files and
>>>    self-signing needed, any device can be captured.
>>> 3. UsbDk co-exists with original device driver, when the device is not
>>>    captured original driver is loaded by the system automatically.
>>> 4. If user mode client terminates unexpectedly for any reason system
>>> reverts
>>>    to original device driver immediately.
>>> 5. Being USB filter driver UsbDk doesn't require WHQL-ing
>>>    as per Microsoft requirements.
>>>
>>> UsbDk supports all Windows OS versions staring from Windows XP,
>>> i.e. XP/Vista/7/8/8.1/2003/2008/2008R2/2012/2012R2.
>>> Both 32 and 64 bit architectures are supported.
>>>
>>> UsbDk is fully open source and distributed under Apache 2.0 license.
>>>
>>> UsbDk project is hosted at spice-space.org, source code repository
>>> available at:
>>> http://cgit.freedesktop.org/spice/win32/usbdk
>>>
>>> Latest source tarball is at: \
>>>
>>> http://www.spice-space.org/download/windows/usbdk/spice-usbdk-win-1.0-4-sources.zip
>>>
>>> UsbDk releases come with precompiled and signed by Red Hat binaries:
>>> 1. 32 bit:
>>> http://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.4_x86.msi
>>> 2. 64 bit:
>>> http://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.4_x64.msi
>>>
>>> UsbDk documentation:
>>> 1. Short presentation:
>>> http://www.spice-space.org/docs/usbdk/UsbDk_at_a_Glance.pdf
>>> 2. SDM:
>>> http://www.spice-space.org/docs/usbdk/UsbDk_Software_Development_Manual.pdf
>>> 3. UsbDk architecture specificatin (part of source tree):
>>>    http://cgit.freedesktop.org/spice/win32/usbdk/tree/ARCHITECTURE
>>>
>>> UsbDk is maintained by Dmitry Fleytman (dfleytma@xxxxxxxxxx) and
>>> Kirill Moizik (kmoizik@xxxxxxxxxx) we'll be glad to answer your questions
>>> sent
>>> to us directly or via this mailing list.
>>>
>>>  This set of patches add UsbDk backend support to spice-gtk. This series
>>> currently cannot be applied since it require next patches series in libusb
>>> http://marc.info/?l=libusb-devel&m=142532078226137&w=2 .
>>> We are waiting for this patches to be commited to libusb soon and then
>>> this series can be applied.
>>>
>>>
>>> V2 changeset :
>>> -opaque usbdk wrapper
>>> -use_usbclerk instead of use_usbdk
>>> -use_usbclerk is DeviceManager member, not global variable
>>> -all v1 suggestions were applied
>>>
>>>
>>> Kirill Moizik (2):
>>>   UsbDk: Add UsbDk wrapper
>>>   UsbDk: Add UsbDk as a default backend
>>>
>>>  src/Makefile.am          |   2 +
>>>  src/usb-device-manager.c | 297
>>> +++++++++++++++++++++++++++++++++--------------
>>>  src/usbdk_api.c          | 166 ++++++++++++++++++++++++++
>>>  src/usbdk_api.h          |  34 ++++++
>>>  4 files changed, 410 insertions(+), 89 deletions(-)
>>>  create mode 100644 src/usbdk_api.c
>>>  create mode 100644 src/usbdk_api.h
>>>
>>> --
>>> 2.1.0
>>>
>>
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>>
>
>
> Best Regards,
> --
> Fabiano Fidêncio


Best Regards,
-- 
Fabiano Fidêncio
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]