From: Owen Smith Date: Tue, 26 Jun 2018 11:17:32 +0000 (+0100) Subject: Relax check for new bindings X-Git-Tag: 9.0.0-rc1~60 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4bfef97168df986ac302f6892ed8c38f81c0b432;p=pvdrivers%2Fwin%2Fxenbus.git Relax check for new bindings Only if the major version part of the revision changes is it unsafe to update the drivers without removing the unplug keys (thereby forcing a fallback to emulated devices on the next reboot). Minor version changes should be backwards compatible (within a reasonable time-frame). Signed-off-by: Owen Smith Edited commit comment. Signed-off-by: Paul Durrant --- diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c index f19d108..fa899f3 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -999,6 +999,7 @@ SupportDeviceID( unsigned int Revision; int Count; DWORD Index; + DWORD LatestRevision; HRESULT Error; DeviceID = strrchr(DeviceID, '&'); @@ -1022,9 +1023,10 @@ SupportDeviceID( goto fail2; found: - // If we don't match the latest revision then it means the driver - // binding will change. - if (Index < ARRAYSIZE(DeviceRevision) - 1) + // If major part of the child device's revision does not match the major + // part of the latest revision then it means the driver binding will change. + LatestRevision = DeviceRevision[ARRAYSIZE(DeviceRevision) - 1]; + if ((Revision & 0xFF000000) != (LatestRevision & 0xFF000000)) *NewBinding = TRUE; Log("%x", Revision);