VirtualBox

Changeset 65976 in vbox


Ignore:
Timestamp:
Mar 7, 2017 12:13:49 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113802
Message:

VUSB: Removed unused 'buffered pipe' code.

Location:
trunk/src/VBox/Devices/USB
Files:
1 deleted
4 edited

Legend:

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

    r64294 r65976  
    142142        Log(("vusb: map output pipe on address %u\n", i8Addr));
    143143        pPipe->out = pEndPtDesc;
    144 
    145 #if 0
    146         if ((pEndPtDesc->Core.bmAttributes & 0x03) == 1)
    147         {
    148             int rc = vusbBufferedPipeCreate(pDev, pPipe, VUSBDIRECTION_OUT, pDev->pUsbIns->enmSpeed,
    149                                             32 /* cLatencyMs*/, &pPipe->hBuffer);
    150             if (RT_SUCCESS(rc))
    151                 LogRel(("VUSB: Created a buffered pipe for isochronous output endpoint\n"));
    152             else
    153                 LogRel(("VUSB: Failed to create a buffered pipe for isochronous output endpoint with rc=%Rrc\n", rc));
    154         }
    155 #endif
    156144    }
    157145
     
    181169        Log(("vusb: unmap IN pipe from address %u (%#x)\n", EndPt, pEndPtDesc->Core.bEndpointAddress));
    182170        pPipe->in = NULL;
    183 
    184         /* Terminate the pipe buffer if created. */
    185         if (pPipe->hBuffer)
    186         {
    187             vusbBufferedPipeDestroy(pPipe->hBuffer);
    188             pPipe->hBuffer = NULL;
    189         }
    190171    }
    191172    else
     
    193174        Log(("vusb: unmap OUT pipe from address %u (%#x)\n", EndPt, pEndPtDesc->Core.bEndpointAddress));
    194175        pPipe->out = NULL;
    195 
    196         /* Terminate the pipe buffer if created. */
    197         if (pPipe->hBuffer)
    198         {
    199             vusbBufferedPipeDestroy(pPipe->hBuffer);
    200             pPipe->hBuffer = NULL;
    201         }
    202176    }
    203177
     
    236210    vusbMsgFreeExtraData(pPipe->pCtrl);
    237211    pPipe->pCtrl = NULL;
    238 
    239     if (pPipe->hBuffer)
    240     {
    241         vusbBufferedPipeDestroy(pPipe->hBuffer);
    242         pPipe->hBuffer = NULL;
    243     }
    244212
    245213    RT_ZERO(pPipe->in);
  • trunk/src/VBox/Devices/USB/VUSBInternal.h

    r62502 r65976  
    9696    /** Submit timestamp. (logging only) */
    9797    uint64_t        u64SubmitTS;
    98     /** Opaque data holder when this is an URB from a buffered pipe. */
    99     void            *pvBuffered;
    10098} VUSBURBVUSBINT;
    10199
     
    147145void vusbMsgResetExtraData(PVUSBCTRLEXTRA pExtra);
    148146
    149 /** Opaque VUSB buffered pipe management handle. */
    150 typedef struct VUSBBUFFEREDPIPEINT *VUSBBUFFEREDPIPE;
    151 /** Pointer to a VUSB buffered pipe handle. */
    152 typedef VUSBBUFFEREDPIPE *PVUSBBUFFEREDPIPE;
    153 
    154147/**
    155148 * A VUSB pipe
     
    165158    /** Count of active async transfers. */
    166159    volatile uint32_t   async;
    167     /** Pipe buffer - only valid for isochronous endpoints. */
    168     VUSBBUFFEREDPIPE    hBuffer;
    169160} VUSBPIPE;
    170161/** Pointer to a VUSB pipe structure. */
     
    527518
    528519/**
    529  * Completes an URB from a buffered pipe.
    530  *
    531  * @returns nothing.
    532  * @param   pUrb        The URB to complete.
    533  */
    534 DECLHIDDEN(void) vusbBufferedPipeCompleteUrb(PVUSBURB pUrb);
    535 
    536 /**
    537  * Creates a new buffered pipe.
    538  *
    539  * @returns VBox status code.
    540  * @retval  VERR_NOT_SUPPORTED if buffering is not supported for the given pipe.
    541  * @param   pDev         The device instance the pipe is associated with.
    542  * @param   pPipe        The pipe to buffer.
    543  * @param   enmDirection The direction for the buffering.
    544  * @param   enmSpeed     USB device speed.
    545  * @param   cLatencyMs   The maximum latency the buffering should introduce, this influences
    546  *                       the amount of data to buffer.
    547  * @param   phBuffer     Where to store the handle to the buffer on success.
    548  */
    549 DECLHIDDEN(int)  vusbBufferedPipeCreate(PVUSBDEV pDev, PVUSBPIPE pPipe, VUSBDIRECTION enmDirection,
    550                                         VUSBSPEED enmSpeed, uint32_t cLatencyMs,
    551                                         PVUSBBUFFEREDPIPE phBuffer);
    552 
    553 /**
    554  * Destroys a buffered pipe, freeing all acquired resources.
    555  *
    556  * @returns nothing.
    557  * @param   hBuffer     The buffered pipe handle.
    558  */
    559 DECLHIDDEN(void) vusbBufferedPipeDestroy(VUSBBUFFEREDPIPE hBuffer);
    560 
    561 /**
    562  * Submits a URB from the HCD which is subject to buffering.
    563  *
    564  * @returns VBox status code.
    565  * @param   hBuffer     The buffered pipe handle.
    566  * @param   pUrb        The URB from the HCD which is subject to buffering.
    567  */
    568 DECLHIDDEN(int)  vusbBufferedPipeSubmitUrb(VUSBBUFFEREDPIPE hBuffer, PVUSBURB pUrb);
    569 
    570 /**
    571520 * Initializes the given URB pool.
    572521 *
  • trunk/src/VBox/Devices/USB/VUSBUrb.cpp

    r65919 r65976  
    11841184    }
    11851185
    1186 #ifdef VBOX_WITH_USB
    1187     if (pPipe && pPipe->hBuffer)
    1188     {
    1189         rc = vusbBufferedPipeSubmitUrb(pPipe->hBuffer, pUrb);
    1190         return rc;
    1191     }
    1192 #endif
    1193 
    11941186    /*
    11951187     * Take action based on type.
     
    13321324    if (pUrb->enmState == VUSBURBSTATE_REAPED)
    13331325        vusbUrbUnlink(pUrb);
    1334 #ifdef VBOX_WITH_USB
    1335     // Read-ahead URBs are handled differently
    1336     if (pUrb->pVUsb->pvBuffered)
    1337         vusbBufferedPipeCompleteUrb(pUrb);
    1338     else
    1339 #endif
    1340         vusbUrbCompletionRh(pUrb);
     1326
     1327    vusbUrbCompletionRh(pUrb);
    13411328}
    13421329
  • trunk/src/VBox/Devices/USB/VUSBUrbPool.cpp

    r62960 r65976  
    204204    pUrb->pVUsb->pCtrlUrb        = NULL;
    205205    pUrb->pVUsb->u64SubmitTS     = 0;
    206     pUrb->pVUsb->pvBuffered      = NULL;
    207206    pUrb->Dev.pvPrivate          = NULL;
    208207    pUrb->Dev.pNext              = NULL;
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