VirtualBox

Changeset 99367 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Apr 10, 2023 6:51:21 PM (20 months ago)
Author:
vboxsync
Message:

OHCI: More thorough cleanup of URB in-flight tracking.

File:
1 edited

Legend:

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

    r98103 r99367  
    20502050
    20512051/**
     2052 * Clear any possible leftover traces of a URB from the in-flight tracking.
     2053 * Useful if broken guests confuse the tracking logic by using the same TD
     2054 * for multiple URBs. See @bugref{10410}.
     2055 *
     2056 * @param   pThisCC     OHCI instance data, ring-3 edition.
     2057 * @param   pUrb        The URB.
     2058 */
     2059static void ohciR3InFlightClearUrb(POHCICC pThisCC, PVUSBURB pUrb)
     2060{
     2061    unsigned i = 0;
     2062    while (i < RT_ELEMENTS(pThisCC->aInFlight))
     2063    {
     2064        if (pThisCC->aInFlight[i].pUrb == pUrb)
     2065        {
     2066            Log2(("ohciR3InFlightClearUrb: clearing leftover URB!!\n"));
     2067            pThisCC->aInFlight[i].GCPhysTD = 0;
     2068            pThisCC->aInFlight[i].pUrb = NULL;
     2069            pThisCC->cInFlight--;
     2070        }
     2071        i++;
     2072    }
     2073}
     2074
     2075
     2076/**
    20522077 * Removes all TDs associated with a URB from the in-flight tracking.
    20532078 *
     
    20672092                cFramesInFlight = -1;
    20682093    }
     2094    ohciR3InFlightClearUrb(pThisCC, pUrb);
    20692095    return cFramesInFlight;
    20702096}
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