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 /libusb/os/windows_winusb.c | |
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>
Diffstat (limited to 'libusb/os/windows_winusb.c')
-rw-r--r-- | libusb/os/windows_winusb.c | 3 |
1 files changed, 3 insertions, 0 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; |