From b0b9cc139600714778c82456d87b6a8d51cb7372 Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Wed, 13 Sep 2023 14:45:15 +0100 Subject: [PATCH] Remove REV from DeviceID 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 --- src/xenbus/pdo.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/xenbus/pdo.c b/src/xenbus/pdo.c index 663dd3b..3f1e4c5 100644 --- a/src/xenbus/pdo.c +++ b/src/xenbus/pdo.c @@ -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); -- 2.39.5