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

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



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of owen.smith@xxxxxxxxxx
> Sent: 20 September 2016 17:44
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [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>

Acked-by: Paul Durrant <paul.durrant@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
_______________________________________________
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®.