Skip to content
  • Hans de Goede's avatar
    usb-linux: Get the active configuration from sysfs rather then asking the dev · 2cc59d8c
    Hans de Goede authored
    
    
    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: default avatarAnthony Liguori <aliguori@us.ibm.com>
    2cc59d8c