VirtualBox

Changeset 81186 in vbox


Ignore:
Timestamp:
Oct 9, 2019 2:01:16 PM (5 years ago)
Author:
vboxsync
Message:

OHCI: Improved in-flight URB tracking (see bugref:9571).

File:
1 edited

Legend:

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

    r81031 r81186  
    11931193     */
    11941194    pThis->RootHub.pIRhConn->pfnCancelAllUrbs(pThis->RootHub.pIRhConn);
     1195    Assert(pThis->cInFlight == 0);
    11951196
    11961197    /*
     
    28122813    ohciR3Lock(pThis);
    28132814
    2814     /* Do nothing if the HC encountered an unrecoverable error. */
     2815    int cFmAge = ohciR3InFlightRemoveUrb(pThis, pUrb);
     2816
     2817    /* Do nothing requiring memory access if the HC encountered an unrecoverable error. */
    28152818    if (!(pThis->intr_status & OHCI_INTR_UNRECOVERABLE_ERROR))
    28162819    {
     
    28312834         * with the data copying, buffer pointer advancing and error handling.
    28322835         */
    2833         int cFmAge = ohciR3InFlightRemoveUrb(pThis, pUrb);
    28342836        if (pUrb->enmStatus == VUSBSTATUS_UNDO)
    28352837        {
     
    30463048    Log(("ohciR3ServiceTd: failed submitting TdAddr=%#010x EdAddr=%#010x pUrb=%p!!\n",
    30473049         TdAddr, EdAddr, pUrb));
     3050    ohciR3InFlightRemove(pThis, TdAddr);
    30483051    VUSBIRhFreeUrb(pThis->RootHub.pIRhConn, pUrb);
    3049     ohciR3InFlightRemove(pThis, TdAddr);
    30503052    return false;
    30513053}
     
    32163218    Log(("ohciR3ServiceTdMultiple: failed submitting pUrb=%p cbData=%#x EdAddr=%#010x cTds=%d TdAddr0=%#010x - rc=%Rrc\n",
    32173219         pUrb, cbTotal, EdAddr, cTds, TdAddr, rc));
    3218     for (struct OHCITDENTRY *pCur = &Head; pCur; pCur = pCur->pNext, iTd++)
    3219         ohciR3InFlightRemove(pThis, pCur->TdAddr);
     3220    ohciR3InFlightRemoveUrb(pThis, pUrb);
    32203221    VUSBIRhFreeUrb(pThis->RootHub.pIRhConn, pUrb);
    32213222    return false;
     
    34483449     * Submit the URB.
    34493450     */
    3450     ohciR3InFlightAddUrb(pThis, pUrb);
     3451    ohciR3InFlightAdd(pThis, ITdAddr, pUrb);
    34513452    Log(("%s: ohciR3ServiceIsochronousTd: submitting cbData=%#x cIsocPkts=%d EdAddr=%#010x TdAddr=%#010x SF=%#x (%#x)\n",
    34523453         pUrb->pszDesc, pUrb->cbData, pUrb->cIsocPkts, EdAddr, ITdAddr, pITd->HwInfo & ITD_HWINFO_SF, pThis->HcFmNumber));
     
    36403641    {
    36413642        OHCIED Ed;
     3643
     3644        /* Bail if previous processing ended up in the unrecoverable error state. */
     3645        if (pThis->intr_status & OHCI_INTR_UNRECOVERABLE_ERROR)
     3646            break;
     3647
    36423648        ohciR3ReadEd(pThis, EdAddr, &Ed);
    36433649        Assert(!(Ed.hwinfo & ED_HWINFO_ISO)); /* the guest is screwing us */
     
    37813787    {
    37823788        OHCIED Ed;
     3789
     3790        /* Bail if previous processing ended up in the unrecoverable error state. */
     3791        if (pThis->intr_status & OHCI_INTR_UNRECOVERABLE_ERROR)
     3792            break;
     3793
    37833794        ohciR3ReadEd(pThis, EdAddr, &Ed);
    37843795        Assert(!(Ed.hwinfo & ED_HWINFO_ISO)); /* the guest is screwing us */
     
    38523863    {
    38533864        OHCIED Ed;
     3865
     3866        /* Bail if previous processing ended up in the unrecoverable error state. */
     3867        if (pThis->intr_status & OHCI_INTR_UNRECOVERABLE_ERROR)
     3868            break;
    38543869
    38553870        ohciR3ReadEd(pThis, EdAddr, &Ed);
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