VirtualBox

Ignore:
Timestamp:
Feb 24, 2022 12:20:43 PM (3 years ago)
Author:
vboxsync
Message:

Devices/USB: Convert the HCI emulations to call into the roothub using the devices port instead of using the VUSBIDEVICE interface directly. This will avoid races when devices will get detached unexpectedly while being in use. Also move the device re-attach logic after a saved state operation down to the roothub in order to avoid code duplication, bugref:10196

File:
1 edited

Legend:

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

    r93115 r93914  
    14331433        vusbDevSetAddress(pDev, VUSB_DEFAULT_ADDRESS);
    14341434    if (pfnDone)
    1435         pfnDone(&pDev->IDevice, rc, pvUser);
     1435        pfnDone(&pDev->IDevice, pDev->i16Port, rc, pvUser);
    14361436}
    14371437
     
    16471647        PVUSBROOTHUB pRh = (PVUSBROOTHUB)pDev;
    16481648        VUSBIRhCancelAllUrbs(&pRh->IRhConnector);
    1649         VUSBIRhReapAsyncUrbs(&pRh->IRhConnector, pInterface, 0);
     1649        VUSBIRhReapAsyncUrbs(&pRh->IRhConnector, pDev->i16Port, 0);
    16501650    }
    16511651
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