[PATCH 02/46] common/sfc_efx/base: add efsys option for Medford4

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Apr 17 09:08:20 CEST 2025


On 4/16/25 16:59, Ivan Malov wrote:
> From: Denis Pryazhennikov <denis.pryazhennikov at arknetworks.am>
> 
> Later patches will use this to implement support for Medford4.
> 
> Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov at arknetworks.am>
> Reviewed-by: Andy Moreton <andy.moreton at amd.com>
> ---
>   drivers/common/sfc_efx/base/efx_check.h | 24 ++++++++++++++----------
>   drivers/common/sfc_efx/efsys.h          |  2 ++
>   2 files changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/common/sfc_efx/base/efx_check.h b/drivers/common/sfc_efx/base/efx_check.h
> index 66b38eeae0..0b9f4fb516 100644
> --- a/drivers/common/sfc_efx/base/efx_check.h
> +++ b/drivers/common/sfc_efx/base/efx_check.h

[snip]

> @@ -197,7 +198,7 @@
>   
>   #if EFSYS_OPT_IMAGE_LAYOUT
>   /* Support signed image layout handling */
> -# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
> +# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 || EFSYS_OPT_MEDFORD4)
>   #  error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"

MEDRORD4 is lost here in error message

>   # endif
>   #endif /* EFSYS_OPT_IMAGE_LAYOUT */
> @@ -338,8 +339,10 @@
>   
>   #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
>   /* Support adapters with missing static config (for factory use only) */
> -# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
> -#  error "ALLOW_UNCONFIGURED_NIC requires RIVERHEAD or MEDFORD or MEDFORD2"
> +# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 || \
> +	EFSYS_OPT_MEDFORD4)
> +#  error "ALLOW_UNCONFIGURED_NIC requires RIVERHEAD or MEDFORD or MEDFORD2 " \
> +	"or MEDFORD4"

Typically it is a bad idea to split error message since it complicates grep.
Please, double-check that base driver code style requires.
As far as I remember - no.

>   # endif
>   #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
>   

[snip]



More information about the dev mailing list