132 lines
4.0 KiB
Diff
132 lines
4.0 KiB
Diff
+++ src/app/virtualbox/src/VBox/Devices/USB/VUSBDevice.cpp
|
|
@@ -230,7 +230,14 @@
|
|
if (i != VUSB_PIPE_DEFAULT)
|
|
{
|
|
vusbMsgFreeExtraData(pDev->aPipes[i].pCtrl);
|
|
+
|
|
+ int rc = RTCritSectDelete(&pDev->aPipes[i].CritSectCtrl);
|
|
+ AssertRC(rc);
|
|
+
|
|
memset(&pDev->aPipes[i], 0, sizeof(pDev->aPipes[i]));
|
|
+
|
|
+ rc = RTCritSectInit(&pDev->aPipes[i].CritSectCtrl);
|
|
+ AssertRC(rc);
|
|
}
|
|
}
|
|
memset(pDev->paIfStates, 0, pCfgDesc->Core.bNumInterfaces * sizeof(pDev->paIfStates[0]));
|
|
@@ -1134,7 +1134,7 @@
|
|
vusbUrbDoReapAsyncDev(pDev, RT_INDEFINITE_WAIT);
|
|
|
|
/* Process any URBs waiting to be cancelled first. */
|
|
- int rc = RTReqQueueProcess(pDev->hReqQueueSync, 0); /* Don't wait if there is nothing to do. */
|
|
+ int rc = RTReqQueueProcess(pDev->hReqQueueSync, pDev->enmState == VUSB_DEVICE_STATE_RESET ? 5 : 0); /* if in reset state (takes 10ms) sleep a bit - otherwise this thread consumes in this loop a lot of cpu time */
|
|
Assert(RT_SUCCESS(rc) || rc == VERR_TIMEOUT);
|
|
}
|
|
|
|
+++ src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
|
|
@@ -13571,6 +13582,7 @@
|
|
AutoCaller autoCaller(this);
|
|
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
|
|
|
|
+#if 0
|
|
#ifdef VBOX_WITH_USB
|
|
HRESULT rc = mUSBDeviceFilters->notifyProxy(true /* aInsertFilters */);
|
|
AssertComRC(rc);
|
|
@@ -13579,6 +13591,7 @@
|
|
USBProxyService *service = mParent->host()->usbProxyService();
|
|
AssertReturn(service, E_FAIL);
|
|
return service->autoCaptureDevicesForVM(this);
|
|
+#endif /* if 0 */
|
|
#else
|
|
return S_OK;
|
|
#endif
|
|
@@ -13601,6 +13614,7 @@
|
|
AutoCaller autoCaller(this);
|
|
AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
|
|
|
|
+#if 0
|
|
#ifdef VBOX_WITH_USB
|
|
HRESULT rc = mUSBDeviceFilters->notifyProxy(false /* aInsertFilters */);
|
|
AssertComRC(rc);
|
|
@@ -13609,6 +13623,7 @@
|
|
USBProxyService *service = mParent->host()->usbProxyService();
|
|
AssertReturn(service, E_FAIL);
|
|
return service->detachAllDevicesFromVM(this, !!aDone, false /* aAbnormal */);
|
|
+#endif /* if 0 */
|
|
#else
|
|
NOREF(aDone);
|
|
return S_OK;
|
|
+++ src/app/virtualbox/src/VBox/Main/include/Matching.h
|
|
@@ -291,10 +291,12 @@
|
|
return mValueAny || mValue == aValue;
|
|
}
|
|
|
|
+#if 0
|
|
bool isMatch (const BOOL aValue) const
|
|
{
|
|
return isMatch (bool (aValue == TRUE));
|
|
}
|
|
+#endif /* if 0 */
|
|
|
|
private:
|
|
|
|
+++ src/app/virtualbox/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
|
|
@@ -1037,13 +1037,10 @@
|
|
LogFlowThisFunc(("aInsertFilters=%RTbool\n", aInsertFilters));
|
|
|
|
AutoCaller autoCaller(this);
|
|
- AssertComRCReturn(autoCaller.rc(), false);
|
|
+ AssertComRCReturnRC(autoCaller.rc());
|
|
|
|
AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
|
|
|
- USBProxyService *pProxySvc = m->pHost->usbProxyService();
|
|
- AssertReturn(pProxySvc, E_FAIL);
|
|
-
|
|
DeviceFilterList::const_iterator it = m->llDeviceFilters->begin();
|
|
while (it != m->llDeviceFilters->end())
|
|
{
|
|
@@ -1054,6 +1051,9 @@
|
|
&& pFilter->getData().mRemote.isMatch(false) /* and if the filter is NOT remote */
|
|
)
|
|
{
|
|
+ USBProxyService *pProxySvc = m->pHost->usbProxyService();
|
|
+ AssertReturn(pProxySvc, E_FAIL);
|
|
+
|
|
if (aInsertFilters)
|
|
{
|
|
AssertReturn(pFilter->getId() == NULL, E_FAIL);
|
|
+++ src/app/virtualbox/src/VBox/Devices/USB/USBProxyDevice.cpp
|
|
@@ -843,10 +843,14 @@
|
|
/*
|
|
* Select backend and open the device.
|
|
*/
|
|
+
|
|
+ return PDMUSB_SET_ERROR(pUsbIns, VERR_NOT_SUPPORTED, N_("USBProxy: not supported on Genode"));
|
|
+#if 0
|
|
if (!fRemote)
|
|
pThis->pOps = &g_USBProxyDeviceHost;
|
|
else
|
|
pThis->pOps = &g_USBProxyDeviceVRDP;
|
|
+#endif /* if 0 */
|
|
|
|
pThis->pvInstanceDataR3 = RTMemAllocZ(pThis->pOps->cbBackend);
|
|
if (!pThis->pvInstanceDataR3)
|
|
+++ src/app/virtualbox/src/VBox/Devices/build/VBoxDD.cpp
|
|
@@ -39,6 +39,7 @@
|
|
NULL,
|
|
};
|
|
|
|
+#if 0
|
|
|
|
/**
|
|
* Register builtin devices.
|
|
@@ -329,6 +330,7 @@
|
|
return VINF_SUCCESS;
|
|
}
|
|
|
|
+#endif /* if 0 */
|
|
|
|
/**
|
|
* Register builtin USB device.
|