]> Git Repo - qemu.git/commit
usb-host-libusb: Configuration 0 may be a valid configuration
authorHans de Goede <[email protected]>
Tue, 8 Oct 2013 19:58:07 +0000 (21:58 +0200)
committerGerd Hoffmann <[email protected]>
Tue, 22 Oct 2013 14:28:49 +0000 (16:28 +0200)
commit1294ca797c6bee39d4dbc3e92010873ce4047e0e
tree8780bb551509105c0ab7a9b066633e32993cbb22
parent5af35d7feccaa7d26b72c6c3d14116421d736b36
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 <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/usb/host-libusb.c
This page took 0.025426 seconds and 4 git commands to generate.