lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 1 Jul 2020 12:11:31 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Edward Cree <ecree@...arflare.com>
Cc:     <linux-net-drivers@...arflare.com>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision
 enumeration

On Wed, 1 Jul 2020 15:55:10 +0100 Edward Cree wrote:
> Also, condition on revision in ethtool drvinfo: if rev is EF100, then
>  we must be the sfc_ef100 driver.  (We can't rely on KBUILD_MODNAME
>  any more, because ethtool_common.o gets linked into both drivers.)
> 
> Signed-off-by: Edward Cree <ecree@...arflare.com>
> ---
>  drivers/net/ethernet/sfc/ethtool_common.c | 5 ++++-
>  drivers/net/ethernet/sfc/nic_common.h     | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
> index 37a4409e759e..926deb22ee67 100644
> --- a/drivers/net/ethernet/sfc/ethtool_common.c
> +++ b/drivers/net/ethernet/sfc/ethtool_common.c
> @@ -104,7 +104,10 @@ void efx_ethtool_get_drvinfo(struct net_device *net_dev,
>  {
>  	struct efx_nic *efx = netdev_priv(net_dev);
>  
> -	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> +	if (efx->type->revision == EFX_REV_EF100)
> +		strlcpy(info->driver, "sfc_ef100", sizeof(info->driver));
> +	else
> +		strlcpy(info->driver, "sfc", sizeof(info->driver));

ethtool info -> driver does not seem like an appropriate place to
report hardware version.

>  	strlcpy(info->version, EFX_DRIVER_VERSION, sizeof(info->version));
>  	efx_mcdi_print_fwver(efx, info->fw_version,
>  			     sizeof(info->fw_version));
> diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h
> index 813f288ab3fe..e04b6817cde3 100644
> --- a/drivers/net/ethernet/sfc/nic_common.h
> +++ b/drivers/net/ethernet/sfc/nic_common.h
> @@ -21,6 +21,7 @@ enum {
>  	 */
>  	EFX_REV_SIENA_A0 = 3,
>  	EFX_REV_HUNT_A0 = 4,
> +	EFX_REV_EF100 = 5,
>  };
>  
>  static inline int efx_nic_rev(struct efx_nic *efx)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ