VirtualBox

Changeset 7788 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 8, 2008 8:48:17 AM (17 years ago)
Author:
vboxsync
Message:

Properly determine USB port version on Windows hosts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostUSBDeviceImpl.cpp

    r7207 r7788  
    302302    AutoReaderLock alock (this);
    303303
    304     /** @todo implement this correctly or things just won't work right, see the vista defect. */
    305     *aPortVersion = mUsb->bcdUSB >> 8;
     304    /* Port version is 2 (EHCI) if and only if the device runs at high speed;
     305     * if speed is unknown, fall back to the old and innacurate method.
     306     */
     307    if (mUsb->enmSpeed == USBDEVICESPEED_UNKNOWN)
     308        *aPortVersion = mUsb->bcdUSB >> 8;
     309    else
     310        *aPortVersion = (mUsb->enmSpeed == USBDEVICESPEED_HIGH) ? 2 : 1;
    306311
    307312    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette