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

[win-pv-devel] [PATCH] Step through hardware revision list in reverse order



From: Owen Smith <owen.smith@xxxxxxxxxx>

Windows treats the HardwareID list as a decending order of specialization
where the first entry is the most specific, and last entry is least specific. 
This 
can lead to install issues when the newer driver has a less-specific HardwareID,
as the older ("more-specific") HardwareID is used for the match.
Reordering the HardwareID list, so that the newest revision is first, will stop
Windows selecting the wrong driver package to install.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xenbus/pdo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xenbus/pdo.c b/src/xenbus/pdo.c
index 3a8540e..2bc7a28 100644
--- a/src/xenbus/pdo.c
+++ b/src/xenbus/pdo.c
@@ -1432,8 +1432,8 @@ PdoQueryId(
         Type = REG_MULTI_SZ;
         Length = Id.MaximumLength;
 
-        for (Index = 0; Index < ARRAYSIZE(PdoRevision); Index++) {
-            PXENBUS_PDO_REVISION Revision = &PdoRevision[Index];
+        for (Index = ARRAYSIZE(PdoRevision); Index > 0; Index--) {
+            PXENBUS_PDO_REVISION Revision = &PdoRevision[Index - 1];
 
            status = RtlStringCbPrintfW(Buffer,
                                        Length,
-- 
2.8.2


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

 


Rackspace

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