Changeset 81667 in vbox for trunk/src/VBox
- Timestamp:
- Nov 5, 2019 11:08:21 AM (5 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r81624 r81667 1836 1836 unsigned cbPacket = cb; 1837 1837 uint32_t iDesc = CSR_XMTRC(pThis); 1838 uint32_t iFirstDesc = iDesc; 1838 1839 1839 1840 STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTxLenCalc), a); … … 1845 1846 else 1846 1847 iDesc--; 1848 1849 if (iDesc == iFirstDesc) 1850 break; 1847 1851 1848 1852 RTGCPHYS32 addrDesc = pcnetTdraAddr(pThis, iDesc); … … 2484 2488 int rc; 2485 2489 unsigned cFlushIrq = 0; 2490 int cMax = 32; 2486 2491 STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTransmit), a); 2487 2492 do … … 2718 2723 STAM_COUNTER_INC(&pThis->aStatXmitChainCounts[RT_MIN(cBuffers, 2719 2724 RT_ELEMENTS(pThis->aStatXmitChainCounts)) - 1]); 2725 if (--cMax == 0) 2726 break; 2720 2727 } while (CSR_TXON(pThis)); /* transfer on */ 2721 2728 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r81644 r81667 20671 20671 <interface 20672 20672 name="IUSBDevice" extends="$unknown" 20673 uuid=" 7ea6ec18-ed43-48e6-a12c-6988c5c9e3ff"20673 uuid="6dc83c2c-81a9-4005-9d52-fc45a78bf3f5" 20674 20674 wsmap="managed" 20675 20675 reservedAttributes="4" … … 20720 20720 20721 20721 <attribute name="address" type="wstring" readonly="yes"> 20722 <desc>Host specific address of the device.</desc> 20722 <desc> 20723 Host-specific address of the device, uniquely 20724 identifying a physically connected device in the system. 20725 Note that the address of a USB device may change across 20726 device re-plugs and host suspend/resume cycles or reboots. 20727 </desc> 20723 20728 </attribute> 20724 20729 20725 20730 <attribute name="port" type="unsigned short" readonly="yes"> 20726 20731 <desc> 20727 Host USB port number the device is physically20732 Host USB port number on the hub the device is physically 20728 20733 connected to. 20734 </desc> 20735 </attribute> 20736 20737 <attribute name="portPath" type="wstring" readonly="yes"> 20738 <desc> 20739 Host-specific identifier of the port (including hub) the USB 20740 device is physically connected to. Note that hubs may be 20741 dynamically added and removed, and that hub enumeration may not 20742 be consistent across host reboots. 20729 20743 </desc> 20730 20744 </attribute> -
trunk/src/VBox/Main/include/HostUSBDeviceImpl.h
r76592 r81667 259 259 HRESULT getAddress(com::Utf8Str &aAddress); 260 260 HRESULT getPort(USHORT *aPort); 261 HRESULT getPortPath(com::Utf8Str &aPortPath); 261 262 HRESULT getVersion(USHORT *aVersion); 262 263 HRESULT getPortVersion(USHORT *aPortVersion); -
trunk/src/VBox/Main/include/RemoteUSBDeviceImpl.h
r76562 r81667 79 79 HRESULT getPort(USHORT *aPort); 80 80 HRESULT getVersion(USHORT *aVersion); 81 HRESULT getPort Version(USHORT *aPortVersion);81 HRESULT getPortPath(com::Utf8Str &aAddress); 82 82 HRESULT getSpeed(USBConnectionSpeed_T *aSpeed); 83 83 HRESULT getRemote(BOOL *aRemote); … … 92 92 { 93 93 Data() : vendorId(0), productId(0), revision(0), port(0), version(1), 94 portVersion(1),speed(USBConnectionSpeed_Null), dirty(FALSE),94 speed(USBConnectionSpeed_Null), dirty(FALSE), 95 95 devId(0), clientId(0) {} 96 96 … … 109 109 110 110 const uint16_t port; 111 const Utf8Str portPath; 111 112 const uint16_t version; 112 const uint16_t portVersion;113 113 const USBConnectionSpeed_T speed; 114 114 -
trunk/src/VBox/Main/include/USBDeviceImpl.h
r81644 r81667 57 57 HRESULT getAddress(com::Utf8Str &aAddress); 58 58 HRESULT getPort(USHORT *aPort); 59 HRESULT getPortPath(com::Utf8Str &aPortPath); 59 60 HRESULT getVersion(USHORT *aVersion); 60 61 HRESULT getSpeed(USBConnectionSpeed_T *aSpeed); … … 91 92 /** The host port number. */ 92 93 const USHORT port; 94 /** The host port path. */ 95 const com::Utf8Str portPath; 93 96 /** The major USB version number of the device. */ 94 97 const USHORT version; -
trunk/src/VBox/Main/src-client/RemoteUSBDeviceImpl.cpp
r76553 r81667 78 78 unconst(mData.backend) = "vrdp"; 79 79 80 char port[16]; 81 RTStrPrintf(port, sizeof(port), "%u", pDevDesc->idPort); 82 unconst(mData.portPath) = port; 83 80 84 unconst(mData.port) = pDevDesc->idPort; 81 85 unconst(mData.version) = (uint16_t)(pDevDesc->bcdUSB >> 8); … … 89 93 case VRDE_USBDEVICESPEED_LOW: 90 94 case VRDE_USBDEVICESPEED_FULL: 91 unconst(mData.portVersion) = 1;92 95 unconst(mData.speed) = USBConnectionSpeed_Full; 93 96 break; … … 95 98 case VRDE_USBDEVICESPEED_HIGH: 96 99 case VRDE_USBDEVICESPEED_VARIABLE: 97 unconst(mData.portVersion) = 2;98 100 unconst(mData.speed) = USBConnectionSpeed_High; 99 101 break; 100 102 101 103 case VRDE_USBDEVICESPEED_SUPERSPEED: 102 unconst(mData.portVersion) = 3;103 104 unconst(mData.speed) = USBConnectionSpeed_Super; 104 105 break; … … 107 108 else 108 109 { 109 unconst(mData.portVersion) = mData.version;110 110 unconst(mData.speed) = mData.version == 3 ? USBConnectionSpeed_Super 111 111 : mData.version == 2 ? USBConnectionSpeed_High … … 154 154 155 155 unconst(mData.port) = 0; 156 unconst(mData.portPath).setNull(); 156 157 unconst(mData.version) = 1; 157 unconst(mData.portVersion) = 1;158 158 159 159 unconst(mData.dirty) = FALSE; … … 237 237 } 238 238 239 HRESULT RemoteUSBDevice::getPortPath(com::Utf8Str &aPortPath) 240 { 241 /* this is const, no need to lock */ 242 aPortPath = mData.portPath; 243 244 return S_OK; 245 } 246 239 247 HRESULT RemoteUSBDevice::getVersion(USHORT *aVersion) 240 248 { 241 249 /* this is const, no need to lock */ 242 250 *aVersion = mData.version; 243 244 return S_OK;245 }246 247 HRESULT RemoteUSBDevice::getPortVersion(USHORT *aPortVersion)248 {249 /* this is const, no need to lock */250 *aPortVersion = mData.portVersion;251 251 252 252 return S_OK; -
trunk/src/VBox/Main/src-client/USBDeviceImpl.cpp
r81644 r81667 96 96 ComAssertComRCRet(hrc, hrc); 97 97 98 hrc = aUSBDevice->COMGETTER(PortPath)(bstr.asOutParam()); 99 ComAssertComRCRet(hrc, hrc); 100 98 101 hrc = aUSBDevice->COMGETTER(Version)(&unconst(mData.version)); 99 102 ComAssertComRCRet(hrc, hrc); … … 143 146 144 147 unconst(mData.port) = 0; 148 unconst(mData.portPath).setNull(); 145 149 unconst(mData.version) = 1; 146 150 … … 273 277 /* this is const, no need to lock */ 274 278 *aPort = mData.port; 279 280 return S_OK; 281 } 282 283 HRESULT OUSBDevice::getPortPath(com::Utf8Str &aPortPath) 284 { 285 /* this is const, no need to lock */ 286 aPortPath = mData.portPath; 275 287 276 288 return S_OK; -
trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
r76592 r81667 204 204 205 205 *aPort = mUsb->bPort; 206 207 return S_OK; 208 } 209 210 211 HRESULT HostUSBDevice::getPortPath(com::Utf8Str &aPortPath) 212 { 213 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 214 215 aPortPath = mUsb->pszPortPath; 206 216 207 217 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.