]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Remove REV from DeviceID
authorOwen Smith <owen.smith@cloud.com>
Wed, 13 Sep 2023 13:45:15 +0000 (14:45 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Thu, 28 Sep 2023 12:45:49 +0000 (13:45 +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/xenbus/pdo.c

index 663dd3bb89618100586e076b701059c539d6b4fd..3f1e4c5894295b56930ae859050ff3dda5eb63a4 100644 (file)
@@ -1416,19 +1416,13 @@ PdoQueryId(
         break;
 
     case BusQueryDeviceID: {
-        ULONG                   Index;
-        PXENBUS_PDO_REVISION    Revision;
-
         Type = REG_SZ;
-        Index = ARRAYSIZE(PdoRevision) - 1;
-        Revision = &PdoRevision[Index];
 
         status = RtlStringCbPrintfW(Buffer,
                                     Id.MaximumLength,
-                                    L"XENBUS\\VEN_%hs&DEV_%hs&REV_%08X",
+                                    L"XENBUS\\VEN_%hs&DEV_%hs",
                                     __PdoGetVendorName(Pdo),
-                                    __PdoGetName(Pdo),
-                                    Revision->Number);
+                                    __PdoGetName(Pdo));
         ASSERT(NT_SUCCESS(status));
 
         Buffer += wcslen(Buffer);