]> git.ipfire.org Git - thirdparty/qemu.git/commit
usb-host: avoid libusb_set_configuration calls
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 22 May 2019 09:47:02 +0000 (11:47 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 29 May 2019 05:03:56 +0000 (07:03 +0200)
commitbfe44898848614cfcb3a269bc965afbe1f0f331c
tree7cd12d77f2e11738af3abf017aaf2c062d089edb
parent65f14ab98da1da920f98ee8734dc1588b01d6b2b
usb-host: avoid libusb_set_configuration calls

Seems some devices become confused when we call
libusb_set_configuration().  So before calling the function check
whenever the device has multiple configurations in the first place, and
in case it hasn't (which is the case for the majority of devices) simply
skip the call as it will have no effect anyway.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190522094702.17619-4-kraxel@redhat.com
hw/usb/host-libusb.c