Index: /trunk/include/VBox/vmm/pdmusb.h
===================================================================
--- /trunk/include/VBox/vmm/pdmusb.h	(revision 107275)
+++ /trunk/include/VBox/vmm/pdmusb.h	(revision 107276)
@@ -1492,4 +1492,5 @@
 VMMR3DECL(int)  PDMR3UsbQueryDriverOnLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun,
                                          const char *pszDriver, PPPDMIBASE ppBase);
+VMMR3DECL(int)  PDMR3UsbQueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase);
 
 /** @} */
Index: /trunk/include/VBox/vmm/vmmr3vtable-def.h
===================================================================
--- /trunk/include/VBox/vmm/vmmr3vtable-def.h	(revision 107275)
+++ /trunk/include/VBox/vmm/vmmr3vtable-def.h	(revision 107276)
@@ -638,4 +638,5 @@
 VTABLE_ENTRY(PDMR3UsbQueryLun)
 VTABLE_ENTRY(PDMR3UsbQueryDriverOnLun)
+VTABLE_ENTRY(PDMR3UsbQueryDeviceLun)
 
 VTABLE_ENTRY(PDMR3DriverEnumInstances)
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 107275)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 107276)
@@ -1699,5 +1699,5 @@
             return "3c501";
         case NetworkAdapterType_UsbNet:
-            return "usbnet";
+            return "UsbNet";
         default:
             AssertFailed();
@@ -4357,5 +4357,5 @@
                     int vrc = VINF_SUCCESS;
                     if (adapterType == NetworkAdapterType_UsbNet)
-                        vrc = ptrVM.vtable()->pfnPDMR3UsbQueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
+                        vrc = ptrVM.vtable()->pfnPDMR3UsbQueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
                     else
                         vrc = ptrVM.vtable()->pfnPDMR3QueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
@@ -4468,5 +4468,9 @@
             const char *pszAdapterName = networkAdapterTypeToName(adapterType);
             PPDMIBASE pBase;
-            int vrc = ptrVM.vtable()->pfnPDMR3QueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
+            int vrc;
+            if (adapterType == NetworkAdapterType_UsbNet)
+                vrc = ptrVM.vtable()->pfnPDMR3UsbQueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
+            else
+                vrc = ptrVM.vtable()->pfnPDMR3QueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);
             if (RT_FAILURE(vrc))
             {
Index: /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp	(revision 107275)
+++ /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp	(revision 107276)
@@ -1544,4 +1544,48 @@
     RTCritSectRwLeaveExcl(&pVM->pdm.s.CoreListCritSectRw);
     LogFlow(("PDMR3UsbDriverDetach: returns %Rrc\n", rc));
+    return rc;
+}
+
+
+/**
+ * Queries the base interface of a device LUN.
+ *
+ * This differs from PDMR3UsbQueryLun by that it returns the interface on the
+ * device and not the top level driver.
+ *
+ * @returns VBox status code.
+ * @param   pUVM            The user mode VM handle.
+ * @param   pszDevice       Device name.
+ * @param   iInstance       Device instance.
+ * @param   iLun            The Logical Unit to obtain the interface of.
+ * @param   ppBase          Where to store the base interface pointer.
+ */
+VMMR3DECL(int) PDMR3UsbQueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase)
+{
+    LogFlow(("PDMR3UsbQueryDeviceLun: pszDevice=%p:{%s} iInstance=%u iLun=%u ppBase=%p\n",
+             pszDevice, pszDevice, iInstance, iLun, ppBase));
+    *ppBase = NULL;
+    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
+    PVM pVM = pUVM->pVM;
+    VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE);
+
+    /*
+     * Find the LUN.
+     */
+    RTCritSectRwEnterShared(&pVM->pdm.s.CoreListCritSectRw);
+
+    PPDMLUN pLun;
+    int rc = pdmR3UsbFindLun(pVM, pszDevice, iInstance, iLun, &pLun);
+    if (RT_SUCCESS(rc))
+    {
+        *ppBase = pLun->pBase;
+
+        RTCritSectRwLeaveShared(&pVM->pdm.s.CoreListCritSectRw);
+        LogFlow(("PDMR3UsbQueryDeviceLun: return %Rrc and *ppBase=%p\n", VINF_SUCCESS, *ppBase));
+        return VINF_SUCCESS;
+    }
+
+    RTCritSectRwLeaveShared(&pVM->pdm.s.CoreListCritSectRw);
+    LogFlow(("PDMR3UsbQueryDeviceLun: returns %Rrc\n", rc));
     return rc;
 }
Index: /trunk/src/VBox/VMM/VMMR3/VMMR3.def
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMMR3.def	(revision 107275)
+++ /trunk/src/VBox/VMM/VMMR3/VMMR3.def	(revision 107276)
@@ -326,4 +326,5 @@
     PDMR3UsbQueryLun
     PDMR3UsbQueryDriverOnLun
+    PDMR3UsbQueryDeviceLun
 
     PGMHandlerPhysicalPageTempOff
