Index: /trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp	(revision 82445)
+++ /trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp	(revision 82446)
@@ -111,8 +111,8 @@
     uint16_t        idProduct;
     uint16_t        bcdDevice;
+    uint16_t        wPort;
     uint8_t         bClass;
     uint8_t         bSubClass;
     uint8_t         bProtocol;
-    uint8_t         bPort;
     char            szSerial[MAX_USB_SERIAL_STRING];
     char            szMfgName[MAX_USB_SERIAL_STRING];
@@ -373,4 +373,5 @@
     else
     {
+        LOG(("Setting filter class/subclass/protocol %02X/%02X/%02X\n", pDevice->bClass, pDevice->bSubClass, pDevice->bProtocol));
         USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_CLASS, pDevice->bClass, true);
         USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_SUB_CLASS, pDevice->bSubClass, true);
@@ -379,8 +380,11 @@
 
     /* If the port number looks valid, add it to the filter. */
-    if (pDevice->bPort != 0xffff)
-    {
-        USBFilterSetNumExact(&DevFlt, USBFILTERIDX_PORT, pDevice->bPort, true);
-    }
+    if (pDevice->wPort < 256)
+    {
+        LOG(("Setting filter port %04X\n", pDevice->wPort));
+        USBFilterSetNumExact(&DevFlt, USBFILTERIDX_PORT, pDevice->wPort, true);
+    }
+    else
+        LOG(("Port number not known, ignoring!"));
 
     /* Run filters on the thing. */
@@ -655,9 +659,11 @@
         if (!NT_SUCCESS(Status))
         {
-            /* We do need this, and it should always be available. */
+            /* We do need this, but not critically. On Windows 7, we may get STATUS_OBJECT_NAME_NOT_FOUND. */
             WARN(("IoGetDevicePropertyData failed for DEVPKEY_Device_LocationPaths, Status (0x%x)", Status));
-            break;
-        }
-        LOG_STRW(pDevice->szLocationPath);
+        }
+        else
+        {
+            LOG_STRW(pDevice->szLocationPath);
+        }
 
         /* Query the location information. The hub number is iffy because the numbering is
@@ -667,14 +673,18 @@
         if (!NT_SUCCESS(Status))
         {
-            /* We may well need this, and it should always be available. */
+            /* This is useful but not critical. On Windows 7, we may get STATUS_OBJECT_NAME_NOT_FOUND. */
             WARN(("IoGetDevicePropertyData failed for DEVPKEY_Device_LocationInfo, Status (0x%x)", Status));
-            break;
-        }
-        LOG_STRW(wchPropBuf);
-        rc = vboxUsbParseLocation(wchPropBuf, &hub, &port);
-        if (!rc)
-        {
-            /* This *really* should not happen but it's not fatal. */
-            WARN(("Failed to parse Location Info"));
+            hub = port = 0xffff;
+            Status = STATUS_SUCCESS;    /* Need to override the IoGetDevicePropertyData return. */
+        }
+        else
+        {
+            LOG_STRW(wchPropBuf);
+            rc = vboxUsbParseLocation(wchPropBuf, &hub, &port);
+            if (!rc)
+            {
+                /* This *really* should not happen but it's not fatal. */
+                WARN(("Failed to parse Location Info"));
+            }
         }
 
@@ -686,6 +696,6 @@
         }
 
-        LOG(("Device pid=%x vid=%x rev=%x", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice));
-        pDevice->bPort        = port;
+        LOG(("Device pid=%x vid=%x rev=%x port=%x", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice, port));
+        pDevice->wPort        = port;
         pDevice->idVendor     = pDevDr->idVendor;
         pDevice->idProduct    = pDevDr->idProduct;
