[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200701.124422.999920966272100417.davem@davemloft.net>
Date: Wed, 01 Jul 2020 12:44:22 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kuba@...nel.org
Cc: ecree@...arflare.com, linux-net-drivers@...arflare.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 12/15] sfc_ef100: add EF100 to NIC-revision
enumeration
From: Jakub Kicinski <kuba@...nel.org>
Date: Wed, 1 Jul 2020 12:11:31 -0700
> 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.
Agreed.
Or is this code used as a library by two "drivers"? In that case it's fine.
Powered by blists - more mailing lists