]> git.proxmox.com Git - qemu.git/commit - usb-linux.c
usb-linux: Get the active configuration from sysfs rather then asking the dev
authorHans de Goede <hdegoede@redhat.com>
Wed, 10 Nov 2010 09:06:25 +0000 (10:06 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 16 Nov 2010 20:35:00 +0000 (14:35 -0600)
commit2cc59d8cb0ebcfa9cf3476c0528e50478997ab0c
tree75e77787d1b8d4d0dac27d0128961cf126713368
parent71d71bbdeb39544ac1602c5e307d9e14c78f9d5d
usb-linux: Get the active configuration from sysfs rather then asking the dev

Some devices seem to choke on receiving a USB_REQ_GET_CONFIGURATION ctrl msg
(witnessed with a digital picture frame usb id 1908:1320).
When usb_fs_type == USB_FS_SYS, the active configuration can be read directly
from sysfs, which allows using this device through qemu's usb redirection.
More in general it seems a good idea to not send needless control msg's to
devices, esp. as the code in question is called every time a set_interface
is done. Which happens multiple times during virtual machine startup, and
when device drivers are activating the usb device.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-linux.c