windows: relax HCD root hub enumeration errors
authorJie Zhang <jie.zhang@analog.com>
Mon, 8 Oct 2018 18:53:13 +0000 (14:53 -0400)
committerChris Dickens <christopher.a.dickens@gmail.com>
Fri, 3 Jan 2020 03:27:29 +0000 (19:27 -0800)
Enumeration errors happen on one HCD root hub should not prevent
enumerating other hubs. This will fix an issue seen on some Windows 7
hosts with USB 3.0 host controller.

Closes #441, Closes #483

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_winusb.c
libusb/version_nano.h

index 71794c1..2a7afad 100644 (file)
@@ -955,7 +955,7 @@ static int enumerate_hcd_root_hub(struct libusb_context *ctx, const char *dev_id
        unsigned long session_id;
        DEVINST child_devinst;
 
-       if ((CM_Get_Child(&child_devinst, devinst, 0)) != CR_SUCCESS) {
+       if (CM_Get_Child(&child_devinst, devinst, 0) != CR_SUCCESS) {
                usbi_warn(ctx, "could not get child devinst for '%s'", dev_id);
                return LIBUSB_SUCCESS;
        }
@@ -963,8 +963,8 @@ static int enumerate_hcd_root_hub(struct libusb_context *ctx, const char *dev_id
        session_id = (unsigned long)child_devinst;
        dev = usbi_get_device_by_session_id(ctx, session_id);
        if (dev == NULL) {
-               usbi_err(ctx, "program assertion failed - HCD '%s' child not found", dev_id);
-               return LIBUSB_ERROR_NO_DEVICE;
+               usbi_warn(ctx, "program assertion failed - HCD '%s' child not found", dev_id);
+               return LIBUSB_SUCCESS;
        }
 
        if (dev->bus_number == 0) {
index 03d3e91..72fdef3 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11419
+#define LIBUSB_NANO 11420