VirtualBox

Ignore:
Timestamp:
Feb 28, 2022 12:03:21 PM (3 years ago)
Author:
vboxsync
Message:

Devices/USB: Fix for regression introduced with r150168 where a guest failed to enumerate USB devices if more than one device was on the bus when the VM was powered on. Simplify the code even more to not require any lists for devices in the default state, bugref:10196

File:
1 edited

Legend:

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

    r93956 r93974  
    430430    pThis->apDevByPort[uPort]  = NULL;
    431431
    432     if (pDev->u8Address == VUSB_DEFAULT_ADDRESS)
    433     {
    434         AssertPtr(pThis->apDevByAddr[VUSB_DEFAULT_ADDRESS]);
    435 
    436         if (pDev == pThis->apDevByAddr[VUSB_DEFAULT_ADDRESS])
    437             pThis->apDevByAddr[VUSB_DEFAULT_ADDRESS] = pDev->pNextDefAddr;
    438         else
    439         {
    440             /* Search the list for the device and remove it. */
    441             PVUSBDEV pDevPrev = pThis->apDevByAddr[VUSB_DEFAULT_ADDRESS];
    442 
    443             while (   pDevPrev
    444                    && pDevPrev->pNextDefAddr != pDev)
    445                 pDevPrev = pDevPrev->pNextDefAddr;
    446 
    447             AssertPtr(pDevPrev);
    448             pDevPrev->pNextDefAddr = pDev->pNextDefAddr;
    449         }
    450 
    451         pDev->pNextDefAddr = NULL;
    452     }
    453     else
     432    if (pDev->u8Address != VUSB_INVALID_ADDRESS)
    454433    {
    455434        Assert(pThis->apDevByAddr[pDev->u8Address] == pDev);
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