Changeset 52948 in vbox
- Timestamp:
- Oct 5, 2014 8:53:13 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
r52946 r52948 281 281 static void usbProxyLinuxUrbLinkInFlight(PUSBPROXYDEVLNX pDevLnx, PUSBPROXYURBLNX pUrbLnx) 282 282 { 283 LogFlowFunc(("pDevLnx=%p pUrbLnx=%p\n", pDevLnx, pUrbLnx)); 283 284 Assert(RTCritSectIsOwner(&pDevLnx->CritSect)); 284 Assert(!pUrbLnx->pSplitHead );285 Assert(!pUrbLnx->pSplitHead || pUrbLnx->pSplitHead == pUrbLnx); 285 286 RTListAppend(&pDevLnx->ListInFlight, &pUrbLnx->NodeList); 286 287 } … … 294 295 static void usbProxyLinuxUrbUnlinkInFlight(PUSBPROXYDEVLNX pDevLnx, PUSBPROXYURBLNX pUrbLnx) 295 296 { 297 LogFlowFunc(("pDevLnx=%p pUrbLnx=%p\n", pDevLnx, pUrbLnx)); 296 298 RTCritSectEnter(&pDevLnx->CritSect); 297 299 … … 302 304 303 305 RTListNodeRemove(&pUrbLnx->NodeList); 304 pUrbLnx->pSplitHead = pUrbLnx->pSplitNext = NULL;305 306 306 307 RTCritSectLeave(&pDevLnx->CritSect); … … 319 320 PUSBPROXYURBLNX pUrbLnx; 320 321 322 LogFlowFunc(("pProxyDev=%p pSplitHead=%p\n", pProxyDev, pSplitHead)); 323 321 324 RTCritSectEnter(&pDevLnx->CritSect); 322 325 … … 342 345 pUrbLnx->fCanceledBySubmit = false; 343 346 pUrbLnx->fSplitElementReaped = false; 347 LogFlowFunc(("returns pUrbLnx=%p\n", pUrbLnx)); 344 348 return pUrbLnx; 345 349 } … … 356 360 PUSBPROXYDEVLNX pDevLnx = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVLNX); 357 361 362 LogFlowFunc(("pProxyDev=%p pUrbLnx=%p\n", pProxyDev, pUrbLnx)); 363 364 /* 365 * Link it into the free list. 366 */ 358 367 RTCritSectEnter(&pDevLnx->CritSect); 359 360 /*361 * Link it into the free list.362 */363 368 RTListAppend(&pDevLnx->ListFree, &pUrbLnx->NodeList); 364 365 369 RTCritSectLeave(&pDevLnx->CritSect); 366 370 } … … 376 380 { 377 381 PUSBPROXYDEVLNX pDevLnx = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVLNX); 382 383 LogFlowFunc(("pProxyDev=%p pUrbLnx=%p\n", pProxyDev, pUrbLnx)); 378 384 379 385 RTCritSectEnter(&pDevLnx->CritSect); … … 1306 1312 uint8_t *pb = (uint8_t *)pCur->KUrb.buffer; 1307 1313 1314 LogFlowFunc(("pProxyDev=%p pHead=%p pCur=%p\n", pProxyDev, pHead, pCur)); 1315 1308 1316 Assert(cbLeft != 0); 1309 1317 pNew = pCur->pSplitNext = usbProxyLinuxUrbAlloc(pProxyDev, pHead); … … 1324 1332 Assert(cbLeft < INT32_MAX); 1325 1333 pNew->cbSplitRemaining = cbLeft; 1334 LogFlowFunc(("returns pNew=%p\n", pNew)); 1326 1335 return pNew; 1327 1336 } … … 1523 1532 if (errno == ENODEV) 1524 1533 { 1534 rc = RTErrConvertFromErrno(errno); 1525 1535 Log(("usbProxyLinuxUrbQueue: ENODEV -> unplugged. pProxyDev=%s\n", usbProxyGetName(pProxyDev))); 1526 1536 if (pUrb->enmType == VUSBXFERTYPE_MSG) … … 1530 1540 usbProxyLinuxUrbFree(pProxyDev, pUrbLnx); 1531 1541 usbProxLinuxUrbUnplugged(pProxyDev); 1532 return RTErrConvertFromErrno(errno);1542 return rc; 1533 1543 } 1534 1544 … … 1792 1802 } 1793 1803 pUrb->cbData = pbEnd - &pUrb->abData[0]; 1804 usbProxyLinuxUrbUnlinkInFlight(pDevLnx, pUrbLnx); 1794 1805 usbProxyLinuxUrbFreeSplitList(pProxyDev, pUrbLnx); 1795 1806 }
Note:
See TracChangeset
for help on using the changeset viewer.