summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2018-10-08 14:53:13 -0400
committerChris Dickens <christopher.a.dickens@gmail.com>2020-01-02 19:27:29 -0800
commita36862b192fe25f621d1559a3b3490888f34a585 (patch)
tree78be80d6aa023df2b06813551323e4e9f512ea89
parent5d0d0a58ed3ea813200b83d69e28a3ea24e86f01 (diff)
downloadlibusb-a36862b192fe25f621d1559a3b3490888f34a585.tar.gz
windows: relax HCD root hub enumeration errors
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>
-rw-r--r--libusb/os/windows_winusb.c6
-rw-r--r--libusb/version_nano.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
index 71794c1..2a7afad 100644
--- a/libusb/os/windows_winusb.c
+++ b/libusb/os/windows_winusb.c
@@ -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) {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 03d3e91..72fdef3 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11419
+#define LIBUSB_NANO 11420