Changeset 70273 in vbox for trunk/src/VBox
- Timestamp:
- Dec 21, 2017 12:43:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/lib/VBoxUsbLib-win.cpp
r69500 r70273 52 52 #include <hidsdi.h> 53 53 54 /* Defined in Windows 8 DDK (through usbdi.h) but we use Windows 7 DDK to build. */ 55 #define UsbSuperSpeed 3 56 54 57 #define VBOX_USB_USE_DEVICE_NOTIFICATION 55 58 … … 310 313 else 311 314 pDev->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; 312 pDev->enmSpeed = USBDEVICESPEED_UNKNOWN; 315 316 /* Determine the speed the device is operating at. */ 317 switch (pConInfo->Speed) 318 { 319 case UsbLowSpeed: pDev->enmSpeed = USBDEVICESPEED_LOW; break; 320 case UsbFullSpeed: pDev->enmSpeed = USBDEVICESPEED_FULL; break; 321 case UsbHighSpeed: pDev->enmSpeed = USBDEVICESPEED_HIGH; break; 322 default: /* If we don't know, most likely it's something new. */ 323 case UsbSuperSpeed: pDev->enmSpeed = USBDEVICESPEED_SUPER; break; 324 } 325 /* Unfortunately USB_NODE_CONNECTION_INFORMATION_EX will not report UsbSuperSpeed, and 326 * it's not even defined in the Win7 DDK we use. So we go by the USB version, and 327 * luckily we know that USB3 must mean SuperSpeed. The USB3 spec guarantees this (9.6.1). 328 */ 329 if (pDev->bcdUSB >= 0x0300) 330 pDev->enmSpeed = USBDEVICESPEED_SUPER; 331 313 332 int rc = RTStrAPrintf((char **)&pDev->pszAddress, "%s", lpszDrvKeyName); 314 333 if (rc < 0) … … 991 1010 || MonInfo.enmState == USBDEVICESTATE_USED_BY_GUEST); 992 1011 pDevs->enmState = MonInfo.enmState; 993 if (pDevs->bcdUSB == 0x300)994 /* USB3 spec guarantees this (9.6.1). */995 pDevs->enmSpeed = USBDEVICESPEED_SUPER;996 else997 /* The following is not 100% accurate but we only care about high-speed vs. non-high-speed */998 pDevs->enmSpeed = Dev.fHiSpeed ? USBDEVICESPEED_HIGH : USBDEVICESPEED_FULL;999 1012 1000 1013 if (pDevs->enmState != USBDEVICESTATE_USED_BY_HOST)
Note:
See TracChangeset
for help on using the changeset viewer.