VirtualBox

Changeset 60178 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 24, 2016 10:58:33 AM (9 years ago)
Author:
vboxsync
Message:

VUSB: Fix assertion and non working devices attached to OHCI after a VM restore

File:
1 edited

Legend:

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

    r59906 r60178  
    898898        AssertRCReturn(rc, rc);
    899899
    900         rc = PDMR3ThreadResume(pThis->hThreadPeriodFrame);
    901         AssertRCReturn(rc, rc);
     900        VMSTATE enmState = PDMDrvHlpVMState(pThis->pDrvIns);
     901        if (   enmState == VMSTATE_RUNNING
     902            || enmState == VMSTATE_RUNNING_LS
     903            || enmState == VMSTATE_RUNNING_FT)
     904        {
     905            rc = PDMR3ThreadResume(pThis->hThreadPeriodFrame);
     906            AssertRCReturn(rc, rc);
     907        }
    902908    }
    903909    else if (   pThis->hThreadPeriodFrame
     
    923929    {
    924930        /* Just switch to the new frame rate and let the periodic frame thread pick it up. */
    925         ASMAtomicXchgU32(&pThis->uFrameRateDefault, uFrameRate);
     931        uint32_t uFrameRateOld = ASMAtomicXchgU32(&pThis->uFrameRateDefault, uFrameRate);
     932
     933        /* Signal the frame thread to continue if it was stopped. */
     934        if (!uFrameRateOld)
     935            RTSemEventMultiSignal(pThis->hSemEventPeriodFrame);
    926936    }
    927937
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