[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/5] Remove REV from DeviceID
 
 
I am prepping XenNet patches (and XenIface/XenVbd). The current XenNet driver will bind to an entry in the HardwareIDs list (REV_09000003) and should install successfully. 
 
 Owen 
 [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. 
 
On 13/09/2023 15:15, Owen Smith wrote: 
> Driver upgrades use HardwareIDs (or CompatibleIDs) to match the child INF DDInstall 
> section (stored as matching device id), but use the DeviceID to generate the device 
> instance path. By keeping the device instance path the same over upgrades, the network 
> stack should identify this as an upgrade, rather than 'replacement hardware', and 
> not generate a new network connection, which would require network settings to be 
> copied from the existing network connection to the new network connection. 
>  
> Note: This introduces a strict requirement for child device INF DDInstall sections to 
>    reference devices by the full (including revision) hardware ID 
>  
 
Do you have a XENNET patch for this. What happens if I install an  
existing build of XENNET on top of a XENVIF with this change? 
 
   Paul 
 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx> 
> --- 
>   src/xenvif/pdo.c | 11 ++--------- 
>   1 file changed, 2 insertions(+), 9 deletions(-) 
>  
> diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c 
> index d43702e..2e47be2 100644 
> --- a/src/xenvif/pdo.c 
> +++ b/src/xenvif/pdo.c 
> @@ -2062,18 +2062,11 @@ PdoQueryId( 
>           break; 
>    
>       case BusQueryDeviceID: { 
> -        ULONG                   Index; 
> -        PXENVIF_PDO_REVISION    Revision; 
> - 
>           Type = REG_SZ; 
> -        Index = ARRAYSIZE(PdoRevision) - 1; 
> -        Revision = &PdoRevision[Index]; 
> - 
>           status = RtlStringCbPrintfW(Buffer, 
>                                       Id.MaximumLength, 
> -                                    L"XENVIF\\VEN_%hs&DEV_NET&REV_%08X", 
> -                                    __PdoGetVendorName(Pdo), 
> -                                    Revision->Number); 
> +                                    L"XENVIF\\VEN_%hs&DEV_NET", 
> +                                    __PdoGetVendorName(Pdo)); 
>           ASSERT(NT_SUCCESS(status)); 
>    
>           Buffer += wcslen(Buffer); 
 
 
  
 
    
     |