VirtualBox

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


Ignore:
Timestamp:
Apr 26, 2013 4:04:44 AM (12 years ago)
Author:
vboxsync
Message:

VBox/USB: fix in common USB code for device detachment.

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

Legend:

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

    r44528 r45755  
    11021102                                 pUrb->pszDesc, pUrb->enmState, pDev, pDev->pUsbIns->pszName));
    11031103                vusbUrbUnlink(pUrb);
     1104                /* Unlink isn't enough, because boundary timer and detaching will try to reap it.
     1105                 * It was tested with MSD & iphone attachment to vSMP guest, if
     1106                 * it breaks anything, please add comment here, why we should unlink only.
     1107                 */
     1108                pUrb->VUsb.pfnFree(pUrb);
    11041109            }
    11051110            pUrb = pNext;
  • trunk/src/VBox/Devices/USB/VUSBUrb.cpp

    r44528 r45755  
    760760        &&  (fComplete || !(pSetup->bmRequestType >> 7))
    761761        &&  pDev
     762        &&  pDev->pDescCache
    762763        &&  pDev->pDescCache->pDevice
    763764        &&  pDev->pDescCache->pDevice->idVendor == 0x046d
     
    19611962             */
    19621963            PVUSBURB pRipe;
    1963             while ((pRipe = pDev->pUsbIns->pReg->pfnUrbReap(pDev->pUsbIns, cMillies)) != NULL)
     1964           
     1965            /**
     1966             * This is workaround for race(should be fixed) detach on one EMT thread and frame boundary timer on other
     1967             * and leaked URBs (shouldn't be affected by leaked URBs).
     1968             */
     1969            Assert(pDev->pUsbIns);
     1970            while (   pDev->pUsbIns
     1971                   && ((pRipe = pDev->pUsbIns->pReg->pfnUrbReap(pDev->pUsbIns, cMillies)) != NULL))
    19641972            {
    19651973                vusbUrbAssert(pRipe);
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