vbox的更動 77000 路徑 trunk/src/VBox/Devices/USB/VUSBDevice.cpp
- 時間撮記:
- 2019-1-26 上午10:30:14 (6 年 以前)
- svn:sync-xref-src-repo-rev:
- 128422
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/USB/VUSBDevice.cpp
r76684 r77000 1214 1214 1215 1215 /** 1216 * Attaches a device to the given hub. 1217 * 1218 * @returns VBox status code. 1219 * @param pDev The device to attach. 1220 * @param pHub THe hub to attach to. 1221 */ 1222 int vusbDevAttach(PVUSBDEV pDev, PVUSBHUB pHub) 1223 { 1224 AssertMsg(pDev->enmState == VUSB_DEVICE_STATE_DETACHED, ("enmState=%d\n", pDev->enmState)); 1225 1226 pDev->pHub = pHub; 1227 pDev->enmState = VUSB_DEVICE_STATE_ATTACHED; 1228 1229 /* noone else ever messes with the default pipe while we are attached */ 1230 vusbDevMapEndpoint(pDev, &g_Endpoint0); 1231 vusbDevDoSelectConfig(pDev, &g_Config0); 1232 1233 /* Create I/O thread and attach to the hub. */ 1234 int rc = vusbDevUrbIoThreadCreate(pDev); 1235 if (RT_SUCCESS(rc)) 1236 rc = pHub->pOps->pfnAttach(pHub, pDev); 1237 1238 if (RT_FAILURE(rc)) 1239 { 1240 pDev->pHub = NULL; 1241 pDev->enmState = VUSB_DEVICE_STATE_DETACHED; 1242 } 1243 1244 return rc; 1245 } 1246 1247 1248 /** 1216 1249 * Detaches a device from the hub it's attached to. 1217 1250 * … … 1245 1278 vusbDevUrbIoThreadDestroy(pDev); 1246 1279 1247 int rc = RTReqQueueDestroy(pDev->hReqQueueSync);1248 AssertRC(rc);1249 pDev->hReqQueueSync = NIL_RTREQQUEUE;1250 1251 1280 vusbDevSetState(pDev, VUSB_DEVICE_STATE_DETACHED); 1252 1281 pDev->pHub = NULL; … … 1283 1312 1284 1313 vusbUrbPoolDestroy(&pDev->UrbPool); 1314 1315 int rc = RTReqQueueDestroy(pDev->hReqQueueSync); 1316 AssertRC(rc); 1317 pDev->hReqQueueSync = NIL_RTREQQUEUE; 1285 1318 1286 1319 RTCritSectDelete(&pDev->CritSectAsyncUrbs); … … 1715 1748 } 1716 1749 1717 1718 static DECLCALLBACK(int) vusbDevGetDescriptorCacheWorker(PPDMUSBINS pUsbIns, PCPDMUSBDESCCACHE *ppDescCache)1719 {1720 *ppDescCache = pUsbIns->pReg->pfnUsbGetDescriptorCache(pUsbIns);1721 return VINF_SUCCESS;1722 }1723 1750 1724 1751 /** … … 1782 1809 AssertRCReturn(rc, rc); 1783 1810 1784 /* Create I/O thread. */1785 rc = vusbDevUrbIoThreadCreate(pDev);1786 AssertRCReturn(rc, rc);1787 1788 1811 /* 1789 1812 * Create the reset timer. … … 1802 1825 * Get the descriptor cache from the device. (shall cannot fail) 1803 1826 */ 1804 rc = vusbDevIoThreadExecSync(pDev, (PFNRT)vusbDevGetDescriptorCacheWorker, 2, pUsbIns, &pDev->pDescCache); 1805 AssertRC(rc); 1827 pDev->pDescCache = pUsbIns->pReg->pfnUsbGetDescriptorCache(pUsbIns); 1806 1828 AssertPtr(pDev->pDescCache); 1807 1829 #ifdef VBOX_STRICT
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器