]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Remove REV from DeviceID
authorOwen Smith <owen.smith@cloud.com>
Wed, 13 Sep 2023 14:15:21 +0000 (15:15 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 29 Sep 2023 13:40:42 +0000 (14:40 +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: This introduces a strict requirement for child device INF DDInstall sections to
  reference devices by the full (including revision) hardware ID

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

index d43702e1e851731d8163b9426077f35f91ef94d5..2e47be2fd14f9b096161ad71647a0c47ba2a6663 100644 (file)
@@ -2062,18 +2062,11 @@ PdoQueryId(
         break;
 
     case BusQueryDeviceID: {
-        ULONG                   Index;
-        PXENVIF_PDO_REVISION    Revision;
-
         Type = REG_SZ;
-        Index = ARRAYSIZE(PdoRevision) - 1;
-        Revision = &PdoRevision[Index];
-
         status = RtlStringCbPrintfW(Buffer,
                                     Id.MaximumLength,
-                                    L"XENVIF\\VEN_%hs&DEV_NET&REV_%08X",
-                                    __PdoGetVendorName(Pdo),
-                                    Revision->Number);
+                                    L"XENVIF\\VEN_%hs&DEV_NET",
+                                    __PdoGetVendorName(Pdo));
         ASSERT(NT_SUCCESS(status));
 
         Buffer += wcslen(Buffer);