VirtualBox

Ignore:
Timestamp:
Jan 26, 2019 10:30:14 AM (6 years ago)
Author:
vboxsync
Message:

Devices/USB: Create the USB I/O thread for each device during the attach phase (as it was destructed during a detach) to fix a debug assertion when saving a VM state where the device gets reattached during the process

File:
1 edited

Legend:

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

    r76553 r77000  
    234234{
    235235    LogFlow(("vusbHubAttach: pHub=%p[%s] pDev=%p[%s]\n", pHub, pHub->pszName, pDev, pDev->pUsbIns->pszName));
    236     AssertMsg(pDev->enmState == VUSB_DEVICE_STATE_DETACHED, ("enmState=%d\n", pDev->enmState));
    237 
    238     pDev->pHub = pHub;
    239     pDev->enmState = VUSB_DEVICE_STATE_ATTACHED;
    240 
    241     /* noone else ever messes with the default pipe while we are attached */
    242     vusbDevMapEndpoint(pDev, &g_Endpoint0);
    243     vusbDevDoSelectConfig(pDev, &g_Config0);
    244 
    245     int rc = pHub->pOps->pfnAttach(pHub, pDev);
    246     if (RT_FAILURE(rc))
    247     {
    248         pDev->pHub = NULL;
    249         pDev->enmState = VUSB_DEVICE_STATE_DETACHED;
    250     }
    251     return rc;
     236    return vusbDevAttach(pDev, pHub);
    252237}
    253238
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