VirtualBox

Ignore:
Timestamp:
Feb 13, 2014 6:01:35 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92279
Message:

USB/ReadAhead: Don't keep the buffered URBs around when the buffer thread is terminated, later buffering might have a different packet size

File:
1 edited

Legend:

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

    r46806 r50453  
    174174     * fTerminate to true and returns immediately). Therefore we have to wait until the
    175175     * previous thread is done and all submitted URBs are completed. */
    176     while (pPipe->cSubmitted > 0)
     176    while (   pPipe->cSubmitted > 0
     177           && pPipe->cBuffered > 0)
    177178    {
    178179        Log2(("vusbDevReadAheadThread: still %u packets submitted, waiting before starting...\n", pPipe->cSubmitted));
     
    246247    }
    247248
     249    /*
     250     * Free all still buffered URBs because another endpoint with a different packet size
     251     * and complete different data formats might be served later.
     252     */
     253    while (pPipe->pBuffUrbHead)
     254    {
     255        PVUSBURB pBufferedUrb = pPipe->pBuffUrbHead;
     256
     257        pPipe->pBuffUrbHead = pBufferedUrb->Hci.pNext;
     258        pBufferedUrb->VUsb.pfnFree(pBufferedUrb);
     259    }
     260
     261    pPipe->pBuffUrbTail = NULL;
     262    pPipe->cBuffered = 0;
    248263    RTMemTmpFree(pArgs);
    249264
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette