summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-05-23 00:10:19 +0100
committerPete Batard <pete@akeo.ie>2012-05-23 00:10:19 +0100
commitcd87b6b1f1a94e85fcd7beb165d182e3fd740a57 (patch)
treec74cb867c86462116efae6fda254abf97dac38d6
parent1cc9c6087d2074f2a8fbebb1ef25d0d889d17c90 (diff)
Windows: Reduce severity of initial conf desc readout failures
* Failure to read the config descriptor through regular API calls can occur for some hubs (eg. 05E3:0608) and is of no major consequence. * Later failures still reported with error severity as they may hide something more dramatic * Issue reported by Jerry from NovaDSP
-rw-r--r--libusb/os/windows_usb.c7
-rw-r--r--libusb/version_nano.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index f29f84c..46f0730 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -901,15 +901,16 @@ static int cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handle
cd_buf_short.req.SetupPacket.wIndex = i;
cd_buf_short.req.SetupPacket.wLength = (USHORT)(size - sizeof(USB_DESCRIPTOR_REQUEST));
- // Dummy call to get the required data size
+ // Dummy call to get the required data size. Initial failures are reported as info rather
+ // than error as they can occur for non-penalizing situations, such as with some hubs.
if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, &cd_buf_short, size,
&cd_buf_short, size, &ret_size, NULL)) {
- usbi_err(ctx, "could not access configuration descriptor (dummy) for '%s': %s", device_id, windows_error_str(0));
+ usbi_info(ctx, "could not access configuration descriptor (dummy) for '%s': %s", device_id, windows_error_str(0));
LOOP_BREAK(LIBUSB_ERROR_IO);
}
if ((ret_size != size) || (cd_buf_short.data.wTotalLength < sizeof(USB_CONFIGURATION_DESCRIPTOR))) {
- usbi_err(ctx, "unexpected configuration descriptor size (dummy) for '%s'.", device_id);
+ usbi_info(ctx, "unexpected configuration descriptor size (dummy) for '%s'.", device_id);
LOOP_BREAK(LIBUSB_ERROR_IO);
}
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index cd14787..5594f40 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10505
+#define LIBUSB_NANO 10506