]> xenbits.xensource.com Git - pvdrivers/win/xenvkbd.git/commitdiff
Remove REV from DeviceID
authorOwen Smith <owen.smith@cloud.com>
Mon, 2 Oct 2023 12:52:04 +0000 (13:52 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 2 Oct 2023 16:03:49 +0000 (17:03 +0100)
Driver upgrades use HardwareIDs (or CompatibleIDs) to match the child INF DDInstall
section (stored as matching device id), but use the DeviceID to generate the device
instance path. By keeping the device instance path the same over upgrades, the network
stack should identify this as an upgrade, rather than 'replacement hardware', and
not generate a new network connection, which would require network settings to be
copied from the existing network connection to the new network connection.

Note: Adds a strict requirement on child INF DDInstall sections, to specify the full
hardware ID (including revision) to guarantee interface versions are correctly supported

Signed-off-by: Owen Smith <owen.smith@cloud.com>
src/xenvkbd/pdo.c

index 256859f6122ce933ef2bd872240010368fc42874..5b52aad45521b482556d4ec1eb9c21312d0c1e0b 100644 (file)
@@ -1318,18 +1318,12 @@ PdoQueryId(
         break;
 
     case BusQueryDeviceID: {
-        ULONG                   Index;
-        PXENVKBD_PDO_REVISION    Revision;
-
         Type = REG_SZ;
-        Index = ARRAYSIZE(PdoRevision) - 1;
-        Revision = &PdoRevision[Index];
 
         status = RtlStringCbPrintfW(Buffer,
                                     Id.MaximumLength,
-                                    L"XENVKBD\\VEN_%hs&DEV_HID&REV_%08X",
-                                    __PdoGetVendorName(Pdo),
-                                    Revision->Number);
+                                    L"XENVKBD\\VEN_%hs&DEV_HID",
+                                    __PdoGetVendorName(Pdo));
         ASSERT(NT_SUCCESS(status));
 
         Buffer += wcslen(Buffer);