VirtualBox

Changeset 53210 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Nov 4, 2014 6:07:07 PM (10 years ago)
Author:
vboxsync
Message:

PDM/VUSB: Provide port/device speed to HCs (and emulated devices).

Location:
trunk/src/VBox/Devices/USB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DevOHCI.cpp

    r52878 r53210  
    966966    uPort--;
    967967    Assert(!pThis->RootHub.aPorts[uPort].pDev);
     968    /* Only LS/FS devices can end up here. */
     969    Assert(pDev->pfnGetSpeed(pDev) == VUSB_SPEED_LOW || pDev->pfnGetSpeed(pDev) == VUSB_SPEED_FULL);
    968970
    969971    /*
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r53062 r53210  
    15781578
    15791579/**
     1580 * @interface_method_impl{VUSBIDEVICE,pfnGetState}
     1581 */
     1582DECLCALLBACK(VUSBSPEED) vusbIDeviceGetSpeed(PVUSBIDEVICE pInterface)
     1583{
     1584    PVUSBDEV pDev = (PVUSBDEV)pInterface;
     1585    VUSBSPEED enmSpeed = pDev->pUsbIns->enmSpeed;
     1586
     1587    LogFlowFunc(("pInterface=%p, returns %u\n", pInterface, enmSpeed));
     1588    return enmSpeed;
     1589}
     1590
     1591
     1592/**
    15801593 * The maximum number of interfaces the device can have in all of it's configuration.
    15811594 *
     
    17181731    pDev->IDevice.pfnGetState = vusbIDeviceGetState;
    17191732    pDev->IDevice.pfnIsEmulated = vusbIDeviceIsEmulated;
     1733    pDev->IDevice.pfnGetSpeed = vusbIDeviceGetSpeed;
    17201734    pDev->pUsbIns = pUsbIns;
    17211735    pDev->pNext = NULL;
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