diff -urN vbox-clean-bk\src\VBox\Devices/Makefile.kmk vbox-clean\src\VBox\Devices/Makefile.kmk
--- vbox-clean-bk\src\VBox\Devices/Makefile.kmk	2015-09-23 07:12:06.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Makefile.kmk	2015-09-26 23:25:40.000000000 +0300
@@ -538,6 +538,11 @@
    $(PATH_SDK_$(VBOX_WINDDK)_LIB)/dsound.lib
  endif
 
+ ifeq ($(KBUILD_TARGET),os2)
+   VBoxDD_LIBS += $(PATH_STAGE_LIB)/VBox-os2-poll$(VBOX_SUFF_LIB)
+   VBoxDD_INCS += $(PATH_SUB_CURRENT)/src/libs/poll-os2
+ endif
+
  ifeq ($(KBUILD_TARGET),linux)
   VBoxDD_SOURCES += \
    	Audio/DrvHostOSSAudio.cpp
diff -urN vbox-clean-bk\src\VBox\Devices/Network/DrvNAT.cpp vbox-clean\src\VBox\Devices/Network/DrvNAT.cpp
--- vbox-clean-bk\src\VBox\Devices/Network/DrvNAT.cpp	2015-09-23 07:12:06.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/DrvNAT.cpp	2015-09-26 23:25:22.000000000 +0300
@@ -42,6 +42,10 @@
 #include <iprt/string.h>
 #include <iprt/stream.h>
 #include <iprt/uuid.h>
+#ifdef RT_OS_OS2
+#include <iprt/socket.h>
+#include <resolv.h>
+#endif
 
 #include "VBoxDD.h"
 
@@ -171,10 +175,17 @@
     PDMNETWORKLINKSTATE     enmLinkStateWant;
 
 #ifndef RT_OS_WINDOWS
+#ifndef RT_OS_OS2
     /** The write end of the control pipe. */
     RTPIPE                  hPipeWrite;
     /** The read end of the control pipe. */
     RTPIPE                  hPipeRead;
+#else
+    /** The write end of the control pipe. */
+    RTSOCKET                hPipeWrite;
+    /** The read end of the control pipe. */
+    RTSOCKET                hPipeRead;
+#endif
 # if HC_ARCH_BITS == 32
     uint32_t                u32Padding;
 # endif
@@ -610,8 +621,13 @@
 #ifndef RT_OS_WINDOWS
     /* kick poll() */
     size_t cbIgnored;
+#ifndef RT_OS_OS2
     rc = RTPipeWrite(pThis->hPipeWrite, "", 1, &cbIgnored);
 #else
+    rc = RTSocketWrite(pThis->hPipeWrite, "", 1);
+#endif
+
+#else
     /* kick WSAWaitForMultipleEvents */
     rc = WSASetEvent(pThis->hWakeupEvent);
 #endif
@@ -784,8 +800,11 @@
 
         /* don't pass the management pipe */
         slirp_select_fill(pThis->pNATState, &nFDs, &polls[1]);
-
+#ifndef RT_OS_OS2
         polls[0].fd = RTPipeToNative(pThis->hPipeRead);
+#else
+	    polls[0].fd = RTSocketToNative(pThis->hPipeRead);
+#endif
         /* POLLRDBAND usually doesn't used on Linux but seems used on Solaris */
         polls[0].events = POLLRDNORM | POLLPRI | POLLRDBAND;
         polls[0].revents = 0;
@@ -825,7 +844,11 @@
                  * pipe.*/
                 char ch;
                 size_t cbRead;
+#ifndef RT_OS_OS2
                 RTPipeRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#else
+		        RTSocketRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#endif
             }
         }
         /* process _all_ outstanding requests but don't wait */
@@ -1611,9 +1634,21 @@
             /*
              * Create the control pipe.
              */
+#ifndef RT_OS_OS2
             rc = RTPipeCreate(&pThis->hPipeRead, &pThis->hPipeWrite, 0 /*fFlags*/);
             AssertRCReturn(rc, rc);
 #else
+	        int so[2];
+
+	        /* Create a pair of connected local sockets */
+	        rc = socketpair(AF_LOCAL, SOCK_STREAM, 0, (int *)so);
+
+            AssertRCReturn(rc, rc);
+	        RTSocketFromNative(&pThis->hPipeRead,  so[0]);
+	        RTSocketFromNative(&pThis->hPipeWrite, so[1]);
+#endif
+
+#else
             pThis->hWakeupEvent = CreateEvent(NULL, FALSE, FALSE, NULL); /* auto-reset event */
             slirp_register_external_event(pThis->pNATState, pThis->hWakeupEvent,
                                           VBOX_WAKEUP_EVENT_INDEX);
diff -urN vbox-clean-bk\src\VBox\Devices/Network/DrvTAP.cpp vbox-clean\src\VBox\Devices/Network/DrvTAP.cpp
--- vbox-clean-bk\src\VBox\Devices/Network/DrvTAP.cpp	2015-09-23 07:12:06.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/DrvTAP.cpp	2015-09-26 23:23:28.000000000 +0300
@@ -39,6 +39,9 @@
 # include <iprt/process.h>
 # include <iprt/env.h>
 #endif
+#ifdef RT_OS_OS2
+#include <iprt/socket.h>
+#endif
 
 #include <sys/ioctl.h>
 #include <sys/poll.h>
@@ -96,10 +99,17 @@
     char                   *pszSetupApplication;
     /** TAP terminate application. */
     char                   *pszTerminateApplication;
+#ifndef RT_OS_OS2
     /** The write end of the control pipe. */
     RTPIPE                  hPipeWrite;
     /** The read end of the control pipe. */
     RTPIPE                  hPipeRead;
+#else
+    /** The write end of the control pipe. */
+    RTSOCKET                hPipeWrite;
+    /** The read end of the control pipe. */
+    RTSOCKET                hPipeRead;
+#endif
     /** Reader thread. */
     PPDMTHREAD              pThread;
 
@@ -347,7 +357,11 @@
         aFDs[0].fd      = RTFileToNative(pThis->hFileDevice);
         aFDs[0].events  = POLLIN | POLLPRI;
         aFDs[0].revents = 0;
+#ifndef RT_OS_OS2
         aFDs[1].fd      = RTPipeToNative(pThis->hPipeRead);
+#else
+        aFDs[1].fd      = RTSocketToNative(pThis->hPipeRead);
+#endif
         aFDs[1].events  = POLLIN | POLLPRI | POLLERR | POLLHUP;
         aFDs[1].revents = 0;
         STAM_PROFILE_ADV_STOP(&pThis->StatReceive, a);
@@ -431,7 +445,11 @@
             /* drain the pipe */
             char ch;
             size_t cbRead;
+#ifndef RT_OS_OS2
             RTPipeRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#else
+	        RTSocketRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#endif
         }
         else
         {
@@ -468,7 +486,11 @@
     PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
 
     size_t cbIgnored;
+#ifndef RT_OS_OS2
     int rc = RTPipeWrite(pThis->hPipeWrite, "", 1, &cbIgnored);
+#else
+    int rc = RTSocketWrite(pThis->hPipeWrite, "", 1);
+#endif
     AssertRC(rc);
 
     return VINF_SUCCESS;
@@ -772,6 +794,7 @@
      * Terminate the control pipe.
      */
     int rc;
+#ifndef RT_OS_OS2
     if (pThis->hPipeWrite != NIL_RTPIPE)
     {
         rc = RTPipeClose(pThis->hPipeWrite); AssertRC(rc);
@@ -782,6 +805,18 @@
         rc = RTPipeClose(pThis->hPipeRead); AssertRC(rc);
         pThis->hPipeRead = NIL_RTPIPE;
     }
+#else
+    if (pThis->hPipeWrite != NIL_RTSOCKET)
+    {
+        rc = RTSocketClose(pThis->hPipeWrite); AssertRC(rc);
+        pThis->hPipeWrite = NIL_RTSOCKET;
+    }
+    if (pThis->hPipeRead != NIL_RTSOCKET)
+    {
+        rc = RTSocketClose(pThis->hPipeRead); AssertRC(rc);
+        pThis->hPipeRead = NIL_RTSOCKET;
+    }
+#endif
 
 #ifdef RT_OS_SOLARIS
     /** @todo r=bird: This *does* need checking against ConsoleImpl2.cpp if used on non-solaris systems. */
@@ -849,8 +884,13 @@
      */
     pThis->pDrvIns                      = pDrvIns;
     pThis->hFileDevice                  = NIL_RTFILE;
+#ifndef RT_OS_OS2
     pThis->hPipeWrite                   = NIL_RTPIPE;
     pThis->hPipeRead                    = NIL_RTPIPE;
+#else
+    pThis->hPipeWrite                   = NIL_RTSOCKET;
+    pThis->hPipeRead                    = NIL_RTSOCKET;
+#endif
     pThis->pszDeviceName                = NULL;
 #ifdef RT_OS_SOLARIS
     pThis->iIPFileDes                   = -1;
@@ -983,9 +1023,19 @@
     /*
      * Create the control pipe.
      */
+#ifndef RT_OS_OS2
     rc = RTPipeCreate(&pThis->hPipeRead, &pThis->hPipeWrite, 0 /*fFlags*/);
     AssertRCReturn(rc, rc);
+#else
+    int so[2];
 
+    /* Create a pair of connected local sockets */
+    rc = socketpair(AF_LOCAL, SOCK_STREAM, 0, (int *)so);
+    AssertRCReturn(rc, rc);
+
+    RTSocketFromNative(&pThis->hPipeRead, so[0]);
+    RTSocketFromNative(&pThis->hPipeWrite, so[1]);
+#endif
     /*
      * Create the async I/O thread.
      */
diff -urN vbox-clean-bk\src\VBox\Devices/Network/DrvVDE.cpp vbox-clean\src\VBox\Devices/Network/DrvVDE.cpp
--- vbox-clean-bk\src\VBox\Devices/Network/DrvVDE.cpp	2015-09-23 07:12:06.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/DrvVDE.cpp	2015-09-26 23:23:52.000000000 +0300
@@ -38,6 +38,9 @@
 #include <iprt/string.h>
 #include <iprt/thread.h>
 #include <iprt/uuid.h>
+#ifdef RT_OS_OS2
+#include <iprt/socket.h>
+#endif
 
 #include <sys/ioctl.h>
 #include <sys/poll.h>
@@ -66,10 +69,17 @@
     PPDMDRVINS              pDrvIns;
     /** The configured VDE device name. */
     char                   *pszDeviceName;
+#ifndef RT_OS_OS2
     /** The write end of the control pipe. */
     RTPIPE                  hPipeWrite;
     /** The read end of the control pipe. */
     RTPIPE                  hPipeRead;
+#else
+    /** The write end of the control pipe. */
+    RTSOCKET                hPipeWrite;
+    /** The read end of the control pipe. */
+    RTSOCKET                hPipeRead;
+#endif
     /** Reader thread. */
     PPDMTHREAD              pThread;
     /** The connection to the VDE switch */
@@ -320,7 +330,11 @@
         aFDs[0].fd      = vde_datafd(pThis->pVdeConn);
         aFDs[0].events  = POLLIN | POLLPRI;
         aFDs[0].revents = 0;
+#ifndef RT_OS_OS2
         aFDs[1].fd      = RTPipeToNative(pThis->hPipeRead);
+#else
+        aFDs[1].fd      = RTSocketToNative(pThis->hPipeRead);
+#endif
         aFDs[1].events  = POLLIN | POLLPRI | POLLERR | POLLHUP;
         aFDs[1].revents = 0;
         STAM_PROFILE_ADV_STOP(&pThis->StatReceive, a);
@@ -402,7 +416,11 @@
             /* drain the pipe */
             char ch;
             size_t cbRead;
+#ifndef RT_OS_OS2
             RTPipeRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#else
+            RTSocketRead(pThis->hPipeRead, &ch, 1, &cbRead);
+#endif
         }
         else
         {
@@ -439,7 +457,11 @@
     PDRVVDE pThis = PDMINS_2_DATA(pDrvIns, PDRVVDE);
 
     size_t cbIgnored;
+#ifndef RT_OS_OS2
     int rc = RTPipeWrite(pThis->hPipeWrite, "", 1, &cbIgnored);
+#else
+    int rc = RTSocketWrite(pThis->hPipeWrite, "", 1);
+#endif
     AssertRC(rc);
 
     return VINF_SUCCESS;
@@ -480,6 +502,7 @@
     /*
      * Terminate the control pipe.
      */
+#ifndef RT_OS_OS2
     if (pThis->hPipeWrite != NIL_RTPIPE)
     {
         RTPipeClose(pThis->hPipeWrite);
@@ -490,6 +513,18 @@
         RTPipeClose(pThis->hPipeRead);
         pThis->hPipeRead = NIL_RTPIPE;
     }
+#else
+    if (pThis->hPipeWrite != NIL_RTSOCKET)
+    {
+        RTSocketClose(pThis->hPipeWrite);
+        pThis->hPipeWrite = NIL_RTSOCKET;
+    }
+    if (pThis->hPipeRead != NIL_RTSOCKET)
+    {
+        RTSocketClose(pThis->hPipeRead);
+        pThis->hPipeRead = NIL_RTSOCKET;
+    }
+#endif
 
     MMR3HeapFree(pThis->pszDeviceName);
     pThis->pszDeviceName = NULL;
@@ -535,8 +570,13 @@
      */
     pThis->pDrvIns                              = pDrvIns;
     pThis->pszDeviceName                        = NULL;
+#ifndef RT_OS_OS2
     pThis->hPipeRead                            = NIL_RTPIPE;
     pThis->hPipeWrite                           = NIL_RTPIPE;
+#else
+    pThis->hPipeRead                            = NIL_RTSOCKET;
+    pThis->hPipeWrite                           = NIL_RTSOCKET;
+#endif
 
     /* IBase */
     pDrvIns->IBase.pfnQueryInterface            = drvVDEQueryInterface;
@@ -608,8 +648,19 @@
     /*
      * Create the control pipe.
      */
+#ifndef RT_OS_OS2
     rc = RTPipeCreate(&pThis->hPipeRead, &pThis->hPipeWrite, 0 /*fFlags*/);
     AssertRCReturn(rc, rc);
+#else
+    int so[2];
+
+    /* Create a pair of connected local sockets */
+    rc = socketpair(AF_LOCAL, SOCK_STREAM, 0, (int *)so);
+    AssertRCReturn(rc, rc);
+
+    RTSocketFromNative(&pThis->hPipeRead, so[0]);
+    RTSocketFromNative(&pThis->hPipeWrite, so[1]);
+#endif
 
     /*
      * Create the async I/O thread.
diff -urN vbox-clean-bk\src\VBox\Devices/Network/slirp/resolv_conf_parser.c vbox-clean\src\VBox\Devices/Network/slirp/resolv_conf_parser.c
--- vbox-clean-bk\src\VBox\Devices/Network/slirp/resolv_conf_parser.c	2015-09-23 07:12:10.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/slirp/resolv_conf_parser.c	2015-09-26 23:24:18.000000000 +0300
@@ -299,6 +299,7 @@
                 }
 
                 break;
+#if !defined(RT_OS_OS2)
             case tok_ipv6:
             case tok_ipv6_port:
                 {
@@ -316,6 +317,7 @@
                 }
 
                 break;
+#endif
             default: /* loop condition doesn't let enter enything */
                 AssertMsgFailed(("shouldn't ever happen tok:%d, %s", tok,
                                  isprint(tok) ? parser->rcpp_str_buffer : "#"));
diff -urN vbox-clean-bk\src\VBox\Devices/Network/slirp/slirp_dns.c vbox-clean\src\VBox\Devices/Network/slirp/slirp_dns.c
--- vbox-clean-bk\src\VBox\Devices/Network/slirp/slirp_dns.c	2015-09-23 07:12:10.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/slirp/slirp_dns.c	2015-09-26 23:24:42.000000000 +0300
@@ -161,7 +161,20 @@
 
     /* XXX: perhaps IPv6 shouldn't be ignored if we're using DNS proxy */
     st.rcps_flags = RCPSF_IGNORE_IPV6;
+#ifndef RT_OS_OS2
     rc = rcp_parse(&st, RESOLV_CONF_FILE);
+#else
+    char *etc = getenv("ETC");
+    char fn[256];
+
+    if (! etc)
+	    return -1;
+
+    strcpy(fn, etc);
+    strcat(fn, "\resolv2");
+
+    rc = rcp_parse(&st, fn);
+#endif
 
     if (rc < 0)
         return -1;
diff -urN vbox-clean-bk\src\VBox\Devices/Network/slirp/slirp.c vbox-clean\src\VBox\Devices/Network/slirp/slirp.c
--- vbox-clean-bk\src\VBox\Devices/Network/slirp/slirp.c	2015-09-23 07:12:10.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Network/slirp/slirp.c	2015-09-26 23:25:02.000000000 +0300
@@ -2109,7 +2109,20 @@
         int rc;
 
         rcp_state.rcps_flags |= RCPSF_IGNORE_IPV6;
+#ifndef RT_OS_OS2
         rc = rcp_parse(&rcp_state, RESOLV_CONF_FILE);
+#else
+	    char *etc = getenv("ETC");
+	    char fn[256];
+
+        if (! etc)
+	        return VERR_FILE_NOT_FOUND;
+
+	    strcpy(fn, etc);
+	    strcat(fn, "\resolv2");
+
+        rc = rcp_parse(&rcp_state, fn);
+#endif
         LogRelFunc(("NAT: rcp_parse:%Rrc old domain:%s new domain:%s\n",
                     rc, LIST_EMPTY(&pData->pDomainList)
                       ? "(null)"
diff -urN vbox-clean-bk\src\VBox\Devices/Storage/DevATA.cpp vbox-clean\src\VBox\Devices/Storage/DevATA.cpp
--- vbox-clean-bk\src\VBox\Devices/Storage/DevATA.cpp	2015-09-23 07:12:30.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Storage/DevATA.cpp	2015-09-26 23:22:06.000000000 +0300
@@ -4499,7 +4499,7 @@
                 cBusy = 0;
                 PDMCritSectLeave(&pCtl->lock);
 
-#ifndef RT_OS_WINDOWS
+#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
                 /*
                  * The thread might be stuck in an I/O operation
                  * due to a high I/O load on the host. (see @bugref{3301})
diff -urN vbox-clean-bk\src\VBox\Devices/Storage/VSCSI/VSCSIVpdPages.h vbox-clean\src\VBox\Devices/Storage/VSCSI/VSCSIVpdPages.h
--- vbox-clean-bk\src\VBox\Devices/Storage/VSCSI/VSCSIVpdPages.h	2015-09-23 07:12:30.000000000 +0300
+++ vbox-clean\src\VBox\Devices/Storage/VSCSI/VSCSIVpdPages.h	2015-09-26 23:22:22.000000000 +0300
@@ -65,7 +65,9 @@
     uint8_t  abVpdPages[1];
 } VSCSIVPDPAGESUPPORTEDPAGES;
 #pragma pack()
+#ifndef RT_OS_OS2 // skip the check
 AssertCompileSize(VSCSIVPDPAGESUPPORTEDPAGES, VSCSI_VPD_SUPPORTED_PAGES_SIZE+1);
+#endif
 typedef VSCSIVPDPAGESUPPORTEDPAGES *PVSCSIVPDPAGESUPPORTEDPAGES;
 typedef const VSCSIVPDPAGESUPPORTEDPAGES *PCVSCSIVPDPAGESUPPORTEDPAGES;
 
@@ -99,7 +101,9 @@
     uint8_t  abReserved[56];
 } VSCSIVPDPAGEBLOCKCHARACTERISTICS;
 #pragma pack()
+#ifndef RT_OS_OS2 // skip the check
 AssertCompileSize(VSCSIVPDPAGEBLOCKCHARACTERISTICS, VSCSI_VPD_BLOCK_CHARACTERISTICS_SIZE);
+#endif
 typedef VSCSIVPDPAGEBLOCKCHARACTERISTICS *PVSCSIVPDPAGEBLOCKCHARACTERISTICS;
 typedef const VSCSIVPDPAGEBLOCKCHARACTERISTICS *PCVSCSIVPDPAGEBLOCKCHARACTERISTICS;
 
diff -urN vbox-clean-bk\src\VBox\Devices/USB/os2/USBProxyDevice-os2.cpp vbox-clean\src\VBox\Devices/USB/os2/USBProxyDevice-os2.cpp
--- vbox-clean-bk\src\VBox\Devices/USB/os2/USBProxyDevice-os2.cpp	2015-09-23 07:12:30.000000000 +0300
+++ vbox-clean\src\VBox\Devices/USB/os2/USBProxyDevice-os2.cpp	2015-09-26 23:22:52.000000000 +0300
@@ -174,7 +174,7 @@
  */
 static PUSBPROXYURBOS2 usbProxyOs2UrbAlloc(PUSBPROXYDEV pProxyDev)
 {
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     PUSBPROXYURBOS2 pUrbOs2;
 
     RTCritSectEnter(&pDevOs2->CritSect);
@@ -216,7 +216,7 @@
  */
 static void usbProxyOs2UrbFree(PUSBPROXYDEV pProxyDev, PUSBPROXYURBOS2 pUrbOs2)
 {
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
 
     RTCritSectEnter(&pDevOs2->CritSect);
 
@@ -260,7 +260,7 @@
 static DECLCALLBACK(int) usbProxyOs2AsyncThread(RTTHREAD Thread, void *pvProxyDev)
 {
     PUSBPROXYDEV pProxyDev = (PUSBPROXYDEV)pvProxyDev;
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     size_t cbLow = 0;
     void *pvLow = NULL;
 
@@ -429,7 +429,7 @@
  * @param   pszAddress      The path to the device.
  * @param   pvBackend       Backend specific pointer, unused for the linux backend.
  */
-static int usbProxyOs2Open(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
+static DECLCALLBACK(int) usbProxyOs2Open(PUSBPROXYDEV pProxyDev, const char *pszAddress, void *pvBackend)
 {
     LogFlow(("usbProxyOs2Open: pProxyDev=%p pszAddress=%s\n", pProxyDev, pszAddress));
     int rc;
@@ -468,7 +468,7 @@
         const char chValue = *psz;
         AssertReleaseReturn(psz[1] == '=', VERR_INTERNAL_ERROR);
         uint64_t u64Value;
-        int rc = RTStrToUInt64Ex(psz + 2, (char **)&psz, 0, &u64Value);
+	    rc = RTStrToUInt64Ex(psz + 2, (char **)&psz, 0, &u64Value);
         AssertReleaseRCReturn(rc, rc);
         AssertReleaseReturn(!*psz || *psz == ';', rc);
         switch (chValue)
@@ -506,7 +506,7 @@
                 rc = RTSemEventCreate(&pDevOs2->EventSyncWait);
                 if (RT_SUCCESS(rc))
                 {
-                    pProxyDev->Backend.pv = pDevOs2;
+		            pProxyDev->pvInstanceDataR3 = pDevOs2;
 
                     /** @todo
                      * Determine the active configuration.
@@ -542,7 +542,7 @@
         rc = VERR_VUSB_USBFS_PERMISSION; /** @todo fix me */
 
     Log(("usbProxyOs2Open(%p, %s) failed, rc=%Rrc! urc=%d\n", pProxyDev, pszAddress, rc, urc)); NOREF(urc);
-    pProxyDev->Backend.pv = NULL;
+    pProxyDev->pvInstanceDataR3 = NULL;
 
     NOREF(pvBackend);
     return rc;
@@ -552,10 +552,10 @@
 /**
  * Closes the proxy device.
  */
-static void usbProxyOs2Close(PUSBPROXYDEV pProxyDev)
+static DECLCALLBACK(void) usbProxyOs2Close(PUSBPROXYDEV pProxyDev)
 {
     LogFlow(("usbProxyOs2Close: pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     Assert(pDevOs2);
     if (!pDevOs2)
         return;
@@ -590,7 +590,7 @@
     pDevOs2->hDevice = 0;
 
     RTMemFree(pDevOs2);
-    pProxyDev->Backend.pv = NULL;
+    pProxyDev->pvInstanceDataR3 = NULL;
     LogFlow(("usbProxyOs2Close: returns\n"));
 }
 
@@ -601,7 +601,7 @@
  * @returns VBox status code.
  * @param   pDev    The device to reset.
  */
-static int usbProxyOs2Reset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
+static DECLCALLBACK(int) usbProxyOs2Reset(PUSBPROXYDEV pProxyDev, bool fResetOnLinux)
 {
     return VINF_SUCCESS;
 }
@@ -617,9 +617,9 @@
  * @param   pProxyDev       The device instance data.
  * @param   iCfg            The configuration to set.
  */
-static int usbProxyOs2SetConfig(PUSBPROXYDEV pProxyDev, int iCfg)
+static DECLCALLBACK(int) usbProxyOs2SetConfig(PUSBPROXYDEV pProxyDev, int iCfg)
 {
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     LogFlow(("usbProxyOs2SetConfig: pProxyDev=%s cfg=%#x\n",
              pProxyDev->pUsbIns->pszName, iCfg));
 
@@ -644,7 +644,7 @@
  * Claims an interface.
  * @returns success indicator.
  */
-static int usbProxyOs2ClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
+static DECLCALLBACK(int) usbProxyOs2ClaimInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
     LogFlow(("usbProxyOs2ClaimInterface: pProxyDev=%s ifnum=%#x\n", pProxyDev->pUsbIns->pszName, iIf));
     return true;
@@ -655,7 +655,7 @@
  * Releases an interface.
  * @returns success indicator.
  */
-static int usbProxyOs2ReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
+static DECLCALLBACK(int) usbProxyOs2ReleaseInterface(PUSBPROXYDEV pProxyDev, int iIf)
 {
     LogFlow(("usbProxyOs2ReleaseInterface: pProxyDev=%s ifnum=%#x\n", pProxyDev->pUsbIns->pszName, iIf));
     return true;
@@ -667,7 +667,7 @@
  *
  * @returns success indicator.
  */
-static int usbProxyOs2SetInterface(PUSBPROXYDEV pProxyDev, int iIf, int iAlt)
+static DECLCALLBACK(int) usbProxyOs2SetInterface(PUSBPROXYDEV pProxyDev, int iIf, int iAlt)
 {
     LogFlow(("usbProxyOs2SetInterface: pProxyDev=%p iIf=%#x iAlt=%#x\n", pProxyDev, iIf, iAlt));
     return true;
@@ -677,9 +677,9 @@
 /**
  * Clears the halted endpoint 'EndPt'.
  */
-static bool usbProxyOs2ClearHaltedEp(PUSBPROXYDEV pProxyDev, unsigned int EndPt)
+static DECLCALLBACK(int) usbProxyOs2ClearHaltedEp(PUSBPROXYDEV pProxyDev, unsigned int EndPt)
 {
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     LogFlow(("usbProxyOs2ClearHaltedEp: pProxyDev=%s EndPt=%x\n", pProxyDev->pUsbIns->pszName, EndPt));
 
     /*
@@ -702,10 +702,9 @@
 /**
  * @copydoc USBPROXYBACK::pfnUrbQueue
  */
-static int usbProxyOs2UrbQueue(PVUSBURB pUrb)
+static DECLCALLBACK(int) usbProxyOs2UrbQueue(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
-    PUSBPROXYDEV    pProxyDev = (PUSBPROXYDEV)pUrb->pDev;
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
     LogFlow(("usbProxyOs2UrbQueue: pProxyDev=%s pUrb=%p EndPt=%d cbData=%d\n",
              pProxyDev->pUsbIns->pszName, pUrb, pUrb->EndPt, pUrb->cbData));
 
@@ -771,10 +770,10 @@
  * @param   pProxyDev   The device.
  * @param   cMillies    Number of milliseconds to wait. Use 0 to not wait at all.
  */
-static PVUSBURB usbProxyOs2UrbReap(PUSBPROXYDEV pProxyDev, RTMSINTERVAL cMillies)
+static DECLCALLBACK(PVUSBURB) usbProxyOs2UrbReap(PUSBPROXYDEV pProxyDev, RTMSINTERVAL cMillies)
 {
     PVUSBURB pUrb = NULL;
-    PUSBPROXYDEVOS2 pDevOs2 = (PUSBPROXYDEVOS2)pProxyDev->Backend.pv;
+    PUSBPROXYDEVOS2 pDevOs2 = USBPROXYDEV_2_DATA(pProxyDev, PUSBPROXYDEVOS2);
 
     RTCritSectEnter(&pDevOs2->CritSect);
     for (;;)
@@ -818,10 +817,9 @@
  * Cancels the URB.
  * The URB requires reaping, so we don't change its state.
  */
-static void usbProxyOs2UrbCancel(PVUSBURB pUrb)
+static DECLCALLBACK(int) usbProxyOs2UrbCancel(PUSBPROXYDEV pProxyDev, PVUSBURB pUrb)
 {
 #if 0
-    PUSBPROXYDEV pProxyDev = (PUSBPROXYDEV)pUrb->pDev;
     PUSBPROXYURBOS2 pUrbOs2 = (PUSBPROXYURBOS2)pUrb->Dev.pvProxyUrb;
     if (pUrbOs2->pSplitHead)
     {
@@ -850,17 +848,23 @@
                  pUrb, errno, pProxyDev->pUsbIns->pszName));
     }
 #endif
+    return 0;
 }
 
+static DECLCALLBACK(int) usbProxyOs2Wakeup(PUSBPROXYDEV pProxyDev)
+{
+    return 1; // (???)
+}
 
 /**
  * The Linux USB Proxy Backend.
  */
 extern const USBPROXYBACK g_USBProxyDeviceHost =
 {
-    "host",
+    "host", /* pszName */
+    sizeof(USBPROXYDEVOS2), /* cbBackend */
     usbProxyOs2Open,
-    NULL,
+    NULL, /* usbProxyOs2Init */
     usbProxyOs2Close,
     usbProxyOs2Reset,
     usbProxyOs2SetConfig,
@@ -871,6 +875,6 @@
     usbProxyOs2UrbQueue,
     usbProxyOs2UrbCancel,
     usbProxyOs2UrbReap,
+    NULL, /* usbProxyOs2Wakeup */
     0
 };
-
