summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2012-07-28 21:24:31 +0200
committerPete Batard <pete@akeo.ie>2012-08-06 00:00:32 +0100
commit636ed66d2639f7610dba792ffe998dc636625f01 (patch)
treef816bfe276c87c4c00a1f4db7f0b83dbda190793
parent3fadb8b4facf5106f1127e389e1855013c1701ca (diff)
Windows: Add workaround for Intel USB 3.0 root hubs
* Intel USB 3.0 root hubs are similar to the Nec/Renesas USB 3.0 root hubs as they aren't listed under "USB" either but under "IUSB3". * Extend the existing workaround for Nec/Renesas USB 3.0 root hubs to handle the Intel ones as well. * Closes #39
-rw-r--r--libusb/os/windows_usb.c12
-rw-r--r--libusb/version_nano.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index 8829da4..28f0a37 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -1231,7 +1231,8 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered
{
struct discovered_devs *discdevs;
HDEVINFO dev_info = { 0 };
- char* usb_class[2] = {"USB", "NUSB3"};
+ char* usb_class[] = {"USB", "NUSB3", "IUSB3"};
+#define MAX_USB_CLASS (sizeof(usb_class)/sizeof(usb_class[0]))
SP_DEVINFO_DATA dev_info_data = { 0 };
SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
GUID hid_guid;
@@ -1340,13 +1341,14 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered
}
} else {
// Workaround for a Nec/Renesas USB 3.0 driver bug where root hubs are
- // being listed under the "NUSB3" PnP Symbolic Name rather than "USB"
- for (; class_index < 2; class_index++) {
+ // being listed under the "NUSB3" PnP Symbolic Name rather than "USB".
+ // The Intel USB 3.0 driver behaves similar, but uses "IUSB3"
+ for (; class_index < MAX_USB_CLASS; class_index++) {
if (get_devinfo_data(ctx, &dev_info, &dev_info_data, usb_class[class_index], i))
break;
i = 0;
}
- if (class_index >= 2)
+ if (class_index >= MAX_USB_CLASS)
break;
}
@@ -2274,7 +2276,7 @@ static int unsupported_copy_transfer_data(struct usbi_transfer *itransfer, uint3
}
// These names must be uppercase
-const char* hub_driver_names[] = {"USBHUB", "USBHUB3", "NUSB3HUB", "FLXHCIH", "TIHUB3", "ETRONHUB3", "VIAHUB3", "ASMTHUB3"};
+const char* hub_driver_names[] = {"USBHUB", "USBHUB3", "NUSB3HUB", "FLXHCIH", "TIHUB3", "ETRONHUB3", "VIAHUB3", "ASMTHUB3", "IUSB3HUB"};
const char* composite_driver_names[] = {"USBCCGP"};
const char* winusb_driver_names[] = {"WINUSB"};
const char* hid_driver_names[] = {"HIDUSB", "MOUHID", "KBDHID"};
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index a43c750..1b7c3e7 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10544
+#define LIBUSB_NANO 10545