diff options
author | Harry Mallon <hjmallon@gmail.com> | 2019-02-07 15:15:03 +0000 |
---|---|---|
committer | Nathan Hjelm <hjelmn@google.com> | 2019-08-09 09:21:03 -0700 |
commit | e80c1508d3469ecf1042adee3905d6305351de79 (patch) | |
tree | 1df16facfecccddf7ba3696127d193e1f4b0b5df | |
parent | e0c4660c1b454b519aad6b1542ffb19e4b8a2159 (diff) | |
download | libusb-e80c1508d3469ecf1042adee3905d6305351de79.tar.gz |
windows_winusb: Add support for reporting super speed plus devices
Closes #531
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
-rw-r--r-- | libusb/os/windows_winusb.c | 3 | ||||
-rw-r--r-- | libusb/os/windows_winusb.h | 4 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c index e3d5cfa..63d4f00 100644 --- a/libusb/os/windows_winusb.c +++ b/libusb/os/windows_winusb.c @@ -909,6 +909,8 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d &conn_info_v2, sizeof(conn_info_v2), &conn_info_v2, sizeof(conn_info_v2), &size, NULL)) { usbi_warn(ctx, "could not get node connection information (V2) for device '%s': %s", priv->dev_id, windows_error_str(0)); + } else if (conn_info_v2.Flags.DeviceIsOperatingAtSuperSpeedPlusOrHigher) { + conn_info.Speed = 4; } else if (conn_info_v2.Flags.DeviceIsOperatingAtSuperSpeedOrHigher) { conn_info.Speed = 3; } @@ -926,6 +928,7 @@ static int init_device(struct libusb_device *dev, struct libusb_device *parent_d case 1: dev->speed = LIBUSB_SPEED_FULL; break; case 2: dev->speed = LIBUSB_SPEED_HIGH; break; case 3: dev->speed = LIBUSB_SPEED_SUPER; break; + case 4: dev->speed = LIBUSB_SPEED_SUPER_PLUS; break; default: usbi_warn(ctx, "unknown device speed %u", conn_info.Speed); break; diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h index 3a911d5..dd8fde5 100644 --- a/libusb/os/windows_winusb.h +++ b/libusb/os/windows_winusb.h @@ -397,7 +397,9 @@ typedef union _USB_NODE_CONNECTION_INFORMATION_EX_V2_FLAGS { struct { ULONG DeviceIsOperatingAtSuperSpeedOrHigher:1; ULONG DeviceIsSuperSpeedCapableOrHigher:1; - ULONG ReservedMBZ:30; + ULONG DeviceIsOperatingAtSuperSpeedPlusOrHigher:1; + ULONG DeviceIsSuperSpeedPlusCapableOrHigher:1; + ULONG ReservedMBZ:28; }; } USB_NODE_CONNECTION_INFORMATION_EX_V2_FLAGS, *PUSB_NODE_CONNECTION_INFORMATION_EX_V2_FLAGS; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 46449d4..1d98258 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11387 +#define LIBUSB_NANO 11388 |