From a36862b192fe25f621d1559a3b3490888f34a585 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Mon, 8 Oct 2018 14:53:13 -0400 Subject: 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 --- libusb/os/windows_winusb.c | 6 +++--- libusb/version_nano.h | 2 +- 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 -- cgit v1.2.1