[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XENVKBD PATCH v4 18/18] Remove vendor device ID from DeviceID



The presence of vendor device ID in DeviceID causes the device instance
path to change if the active device changes.

If forced activation is enabled, the active device will immediately
change when the platform device ID changes or if the vendor device is
toggled. Child drivers will fail to work if they can't cope with the
resulting device instance path change.

Remove the vendor device ID from DeviceID to ensure the device instance
path remains stable across vendor device config changes.

Ported from Xenbus.

Suggested-by: Owen Smith <owen.smith@xxxxxxxxx>
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xenvkbd/pdo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/xenvkbd/pdo.c b/src/xenvkbd/pdo.c
index f10aca0..adb8353 100644
--- a/src/xenvkbd/pdo.c
+++ b/src/xenvkbd/pdo.c
@@ -1318,8 +1318,7 @@ PdoQueryId(
 
         status = RtlStringCbPrintfW(Buffer,
                                     Id.MaximumLength,
-                                    L"XENVKBD\\VEN_%hs&DEV_HID",
-                                    __PdoGetVendorName(Pdo));
+                                    L"XENVKBD\\VEN_" VENDOR_PREFIX_STR 
"&DEV_HID");
         ASSERT(NT_SUCCESS(status));
 
         Buffer += wcslen(Buffer);
-- 
2.50.1.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.