diff options
author | Yuri Benditovich <yuri.benditovich@daynix.com> | 2018-10-17 12:02:19 +0300 |
---|---|---|
committer | Yan Vugenfirer <yan@daynix.com> | 2018-10-17 15:52:34 +0300 |
commit | 4d1ecea50dc99add7d0bc2ff4bb974403941c5e4 (patch) | |
tree | d0d75aef8303770436675695ce2da3d561f60a17 | |
parent | 960f44ed2c697178235caa088a04ac38bd8e675c (diff) |
Report superspeed properly on Win7
Win7 with USB 3.0 stack might not report superspeed
the same way as Win8 does. Use bcdUSB field of device
descriptor for that (USB 3.0 device connected to USB 2.x
port usually falls to USB 2 compatible configuration).
Getting the speed from HUB driver via IOCTL is more
complicated.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
-rw-r--r-- | UsbDk/FilterDevice.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/UsbDk/FilterDevice.cpp b/UsbDk/FilterDevice.cpp index 936db67..1a806a0 100644 --- a/UsbDk/FilterDevice.cpp +++ b/UsbDk/FilterDevice.cpp @@ -362,6 +362,15 @@ void CUsbDkHubFilterStrategy::RegisterNewChild(PDEVICE_OBJECT PDO) return; } +#if (NTDDI_VERSION == NTDDI_WIN7) + // recheck on Win7, superspeed indication as on Win8 might be not available + if (Speed == HighSpeed && DevDescriptor.bcdUSB >= 0x300) + { + TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_FILTERDEVICE, "%!FUNC! superspeed assigned according to BCD field"); + Speed = SuperSpeed; + } +#endif + CUsbDkChildDevice::TDescriptorsCache CfgDescriptors(DevDescriptor.bNumConfigurations); if (!CfgDescriptors.Create()) |