[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] 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.
Minor versioning changes should be made backward combatible, and will
not require reverting to emulated devices on the next boot.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/coinst/coinst.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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);
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.