Changeset 56395 in vbox
- Timestamp:
- Jun 12, 2015 3:12:23 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/USB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/VUSBDevice.cpp
r56292 r56395 1014 1014 PVUSBROOTHUB pRh = vusbDevGetRh(pDev); 1015 1015 AssertPtrReturnVoid(pRh); 1016 if (pDev->u8Address == VUSB_DEFAULT_ADDRESS) 1017 pRh->pDefaultAddress = NULL; 1016 1018 1017 1019 vusbDevAddressUnHash(pDev); 1018 1020 1019 1021 if (u8Address == VUSB_DEFAULT_ADDRESS) 1022 { 1023 if (pRh->pDefaultAddress != NULL) 1024 { 1025 vusbDevAddressUnHash(pRh->pDefaultAddress); 1026 vusbDevSetState(pRh->pDefaultAddress, VUSB_DEVICE_STATE_POWERED); 1027 Log(("2 DEFAULT ADDRS\n")); 1028 } 1029 1030 pRh->pDefaultAddress = pDev; 1020 1031 vusbDevSetState(pDev, VUSB_DEVICE_STATE_DEFAULT); 1032 } 1021 1033 else 1022 1034 vusbDevSetState(pDev, VUSB_DEVICE_STATE_ADDRESS); … … 1167 1179 ASMAtomicXchgBool(&pDev->fTerminate, false); 1168 1180 rc = RTThreadCreateF(&pDev->hUrbIoThread, vusbDevUrbIoThread, pDev, 0, RTTHREADTYPE_IO, 1169 RTTHREADFLAGS_WAITABLE, "%s-%d", pDev->pUsbIns->pReg->szName, 1170 pDev->pUsbIns->iInstance); 1181 RTTHREADFLAGS_WAITABLE, "USBDevIo-%d", pDev->i16Port); 1171 1182 if (RT_SUCCESS(rc)) 1172 1183 { … … 1222 1233 if (!pRh) 1223 1234 AssertMsgFailedReturn(("Not attached!\n"), VERR_VUSB_DEVICE_NOT_ATTACHED); 1235 if (pRh->pDefaultAddress == pDev) 1236 pRh->pDefaultAddress = NULL; 1224 1237 1225 1238 pDev->pHub->pOps->pfnDetach(pDev->pHub, pDev); -
trunk/src/VBox/Devices/USB/VUSBInternal.h
r56141 r56395 329 329 /** Address hash table. */ 330 330 PVUSBDEV apAddrHash[VUSB_ADDR_HASHSZ]; 331 332 #if HC_ARCH_BITS == 32 333 uint32_t Alignment0; 334 #endif 331 /** The default address. */ 332 PVUSBDEV pDefaultAddress; 335 333 336 334 /** Pointer to the driver instance. */ … … 342 340 343 341 #if HC_ARCH_BITS == 32 344 uint32_t Alignment1; 345 #endif 346 342 uint32_t Alignment0; 343 #endif 347 344 /** Critical section protecting the device list. */ 348 345 RTCRITSECT CritSectDevices; … … 351 348 352 349 #if HC_ARCH_BITS == 32 353 uint32_t Alignment 2;350 uint32_t Alignment1; 354 351 #endif 355 352
Note:
See TracChangeset
for help on using the changeset viewer.