diff options
| author | Hans de Goede | 2013-10-08 21:58:07 +0200 |
|---|---|---|
| committer | Gerd Hoffmann | 2013-10-22 16:28:49 +0200 |
| commit | 1294ca797c6bee39d4dbc3e92010873ce4047e0e (patch) | |
| tree | 8780bb551509105c0ab7a9b066633e32993cbb22 /include | |
| parent | usb-host-libusb: Fix reset handling (diff) | |
| download | qemu-1294ca797c6bee39d4dbc3e92010873ce4047e0e.tar.gz qemu-1294ca797c6bee39d4dbc3e92010873ce4047e0e.tar.xz qemu-1294ca797c6bee39d4dbc3e92010873ce4047e0e.zip | |
usb-host-libusb: Configuration 0 may be a valid configuration
Quoting from: linux/Documentation/ABI/stable/sysfs-bus-usb:
Note that some devices, in violation of the USB spec, have a
configuration with a value equal to 0. Writing 0 to
bConfigurationValue for these devices will install that
configuration, rather then unconfigure the device.
So don't compare the configuration value against 0 to check for unconfigured
devices, instead check for a LIBUSB_ERROR_NOT_FOUND return from
libusb_get_active_config_descriptor().
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
