Changeset 65976 in vbox
- Timestamp:
- Mar 7, 2017 12:13:49 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113802
- Location:
- trunk/src/VBox/Devices/USB
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/VUSBDevice.cpp
r64294 r65976 142 142 Log(("vusb: map output pipe on address %u\n", i8Addr)); 143 143 pPipe->out = pEndPtDesc; 144 145 #if 0146 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 else153 LogRel(("VUSB: Failed to create a buffered pipe for isochronous output endpoint with rc=%Rrc\n", rc));154 }155 #endif156 144 } 157 145 … … 181 169 Log(("vusb: unmap IN pipe from address %u (%#x)\n", EndPt, pEndPtDesc->Core.bEndpointAddress)); 182 170 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 }190 171 } 191 172 else … … 193 174 Log(("vusb: unmap OUT pipe from address %u (%#x)\n", EndPt, pEndPtDesc->Core.bEndpointAddress)); 194 175 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 }202 176 } 203 177 … … 236 210 vusbMsgFreeExtraData(pPipe->pCtrl); 237 211 pPipe->pCtrl = NULL; 238 239 if (pPipe->hBuffer)240 {241 vusbBufferedPipeDestroy(pPipe->hBuffer);242 pPipe->hBuffer = NULL;243 }244 212 245 213 RT_ZERO(pPipe->in); -
trunk/src/VBox/Devices/USB/VUSBInternal.h
r62502 r65976 96 96 /** Submit timestamp. (logging only) */ 97 97 uint64_t u64SubmitTS; 98 /** Opaque data holder when this is an URB from a buffered pipe. */99 void *pvBuffered;100 98 } VUSBURBVUSBINT; 101 99 … … 147 145 void vusbMsgResetExtraData(PVUSBCTRLEXTRA pExtra); 148 146 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 154 147 /** 155 148 * A VUSB pipe … … 165 158 /** Count of active async transfers. */ 166 159 volatile uint32_t async; 167 /** Pipe buffer - only valid for isochronous endpoints. */168 VUSBBUFFEREDPIPE hBuffer;169 160 } VUSBPIPE; 170 161 /** Pointer to a VUSB pipe structure. */ … … 527 518 528 519 /** 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 influences546 * 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 /**571 520 * Initializes the given URB pool. 572 521 * -
trunk/src/VBox/Devices/USB/VUSBUrb.cpp
r65919 r65976 1184 1184 } 1185 1185 1186 #ifdef VBOX_WITH_USB1187 if (pPipe && pPipe->hBuffer)1188 {1189 rc = vusbBufferedPipeSubmitUrb(pPipe->hBuffer, pUrb);1190 return rc;1191 }1192 #endif1193 1194 1186 /* 1195 1187 * Take action based on type. … … 1332 1324 if (pUrb->enmState == VUSBURBSTATE_REAPED) 1333 1325 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); 1341 1328 } 1342 1329 -
trunk/src/VBox/Devices/USB/VUSBUrbPool.cpp
r62960 r65976 204 204 pUrb->pVUsb->pCtrlUrb = NULL; 205 205 pUrb->pVUsb->u64SubmitTS = 0; 206 pUrb->pVUsb->pvBuffered = NULL;207 206 pUrb->Dev.pvPrivate = NULL; 208 207 pUrb->Dev.pNext = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.