[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/xenvif/pdo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c
index 8e46566..53fd2e9 100644
--- a/src/xenvif/pdo.c
+++ b/src/xenvif/pdo.c
@@ -2049,8 +2049,8 @@ PdoQueryId(
         Type = REG_MULTI_SZ;
         Length = Id.MaximumLength;
 
-        for (Index = 0; Index < ARRAYSIZE(PdoRevision); Index++) {
-            PXENVIF_PDO_REVISION    Revision = &PdoRevision[Index];
+        for (Index = ARRAYSIZE(PdoRevision); Index > 0; Index--) {
+            PXENVIF_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®.