Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2017 21:01:18 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432460 - in head/emulators/virtualbox-ose: . files
Message-ID:  <201701252101.v0PL1I2X007916@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Jan 25 21:01:18 2017
New Revision: 432460
URL: https://svnweb.freebsd.org/changeset/ports/432460

Log:
  Fix USB support.
  
  PR:		212845
  Submitted by:	hselasky
  Tested by:	Graham Menhennitt (graham at menhennitt dot com dot au)

Modified:
  head/emulators/virtualbox-ose/Makefile
  head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
  head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp

Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile	Wed Jan 25 19:59:50 2017	(r432459)
+++ head/emulators/virtualbox-ose/Makefile	Wed Jan 25 21:01:18 2017	(r432460)
@@ -3,7 +3,7 @@
 
 PORTNAME=	virtualbox-ose
 PORTVERSION=	5.1.14
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	emulators
 MASTER_SITES=	http://download.virtualbox.org/virtualbox/${PORTVERSION}/
 DISTFILES=	VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}

Modified: head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h	Wed Jan 25 19:59:50 2017	(r432459)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h	Wed Jan 25 21:01:18 2017	(r432460)
@@ -1,10 +1,17 @@
---- src/VBox/Main/include/USBProxyBackend.h.orig	2016-08-16 20:00:18 UTC
+--- src/VBox/Main/include/USBProxyBackend.h.orig	2017-01-17 07:27:19 UTC
 +++ src/VBox/Main/include/USBProxyBackend.h
-@@ -365,7 +365,6 @@ protected:
+@@ -359,13 +359,10 @@ public:
+     virtual int releaseDevice(HostUSBDevice *aDevice);
+ 
+ protected:
+-    int initUsbfs(void);
+-    int initSysfs(void);
+     virtual int wait(RTMSINTERVAL aMillies);
      virtual int interruptWait(void);
      virtual PUSBDEVICE getDevices(void);
-     int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc);
+-    int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc);
 -    virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice);
++    virtual bool isFakeUpdateRequired();
  
  private:
      RTSEMEVENT mNotifyEventSem;

Modified: head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp	Wed Jan 25 19:59:50 2017	(r432459)
+++ head/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp	Wed Jan 25 21:01:18 2017	(r432460)
@@ -1,6 +1,42 @@
---- src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp.orig	2016-08-16 20:00:20 UTC
+--- src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp.orig	2017-01-17 07:27:22 UTC
 +++ src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
-@@ -299,21 +299,21 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+@@ -153,6 +153,12 @@ int USBProxyBackendFreeBSD::releaseDevic
+ }
+ 
+ 
++bool USBProxyBackendFreeBSD::isFakeUpdateRequired()
++{
++    return true;
++}
++
++
+ int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies)
+ {
+     return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000);
+@@ -270,8 +276,9 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+                 break;
+             }
+ 
+-            pDevice->enmState           = USBDEVICESTATE_UNUSED;
++            pDevice->enmState           = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
+             pDevice->bBus               = UsbDevInfo.udi_bus;
++            pDevice->bPort              = UsbDevInfo.udi_hubport;
+             pDevice->bDeviceClass       = UsbDevInfo.udi_class;
+             pDevice->bDeviceSubClass    = UsbDevInfo.udi_subclass;
+             pDevice->bDeviceProtocol    = UsbDevInfo.udi_protocol;
+@@ -292,28 +299,33 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+                     pDevice->enmSpeed = USBDEVICESPEED_HIGH;
+                     break;
+                 case USB_SPEED_SUPER:
++                    pDevice->enmSpeed = USBDEVICESPEED_SUPER;
++                    break;
+                 case USB_SPEED_VARIABLE:
++                    pDevice->enmSpeed = USBDEVICESPEED_VARIABLE;
++                    break;
+                 default:
+                     pDevice->enmSpeed = USBDEVICESPEED_UNKNOWN;
++                    break;
+             }
  
              if (UsbDevInfo.udi_vendor[0] != '\0')
              {
@@ -26,3 +62,16 @@
              }
              rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
              if (rc == 0)
+@@ -321,7 +333,6 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+ 
+             pDevice->pszAddress = RTStrDup(pszDevicePath);
+             pDevice->pszBackend = RTStrDup("host");
+-            pDevice->enmState   = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
+ 
+             usbLogDevice(pDevice);
+ 
+@@ -337,4 +348,3 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+ 
+     return pDevices;
+ }
+-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701252101.v0PL1I2X007916>