qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] usb: a problem of using libusb for usb pass through


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] usb: a problem of using libusb for usb pass through
Date: Mon, 22 Jul 2013 14:58:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130621 Thunderbird/17.0.7

On 07/16/13 10:45, Gonglei (Arei) wrote:
> Hi, Gerd
>       My Qemu version is 1.5.1, and use libusb for usb pass through.
>       I pass through a host usb device to the guest by bus number and 
> physical port, when I unplug the usb device from 
> the host, and plug in on the same physical port immediately, but the usb 
> device don't show up in the guest. 
>       The qemu log show:
> libusb_release_interface: -4 [NO_DEVICE]
> libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device 
> /dev/bus/usb/002/004: No such file or directory
> libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device 
> /dev/bus/usb/002/004: No such file or directory
> libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device 
> /dev/bus/usb/002/004: No such file or directory
> 
>       I find the reason is that the global libusb_context has recorded the 
> usb devices' devnum, but when the host device was unplugged and plugged
> from the host, the devnum will change, finally cause the problem. 
>       Any ideas ? Thanks!

Sounds like libusbx doesn't flush the cache on unplug even though it
should.  Hans?

[ qemu uses one global libusb_context.  libusb_device and
  libusb_device_handle are allocated and released on open/close ]

cheers,
  Gerd





reply via email to

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