VirtualBox

Changeset 49814 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Dec 6, 2013 9:38:28 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91156
Message:

Devices/USB: First part of the rework, move most of the work to dedicated threads to improve performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r46420 r49814  
    642642    {
    643643        pdmR3TermLuns(pVM, pUsbIns->Internal.s.pLuns, pUsbIns->pReg->szName, pUsbIns->iInstance);
     644
     645        /*
     646         * Detach it from the HUB (if it's actually attached to one) so the HUB has
     647         * a chance to stop accessing any data.
     648         */
     649        PPDMUSBHUB pHub = pUsbIns->Internal.s.pHub;
     650        if (pHub)
     651        {
     652            int rc = pHub->Reg.pfnDetachDevice(pHub->pDrvIns, pUsbIns, pUsbIns->Internal.s.iPort);
     653            if (RT_FAILURE(rc))
     654            {
     655                LogRel(("PDM: Failed to detach USB device '%s' instance %d from %p: %Rrc\n",
     656                        pUsbIns->pReg->szName, pUsbIns->iInstance, pHub, rc));
     657            }
     658            else
     659            {
     660                pHub->cAvailablePorts++;
     661                Assert(pHub->cAvailablePorts > 0 && pHub->cAvailablePorts <= pHub->cPorts);
     662                pUsbIns->Internal.s.pHub = NULL;
     663            }
     664        }
    644665
    645666        if (pUsbIns->pReg->pfnDestruct)
Note: See TracChangeset for help on using the changeset viewer.

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