diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-05-26 11:01:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-26 12:27:32 -0700 |
commit | 6ecb0a0c0d9539fac1497d1d218e60a393a1070c (patch) | |
tree | 8b6ed2709d3b8d9839dc4ae73a59b41038bc1922 /drivers/net | |
parent | ce2b885cc5014d1cbcbe519c45f00f6a59e5ab70 (diff) | |
download | linux-6ecb0a0c0d9539fac1497d1d218e60a393a1070c.tar.gz linux-6ecb0a0c0d9539fac1497d1d218e60a393a1070c.tar.bz2 linux-6ecb0a0c0d9539fac1497d1d218e60a393a1070c.zip |
qede: Don't expose self-test for VFs
PFs and VFs differ in their registered ethtool operations,
but they're using a common function for get_sset_count().
As a result, `ethtool -i' for a VF would indicate it supports
selftest, although that's not the case.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 1bc75358cbc4..ad3cae3b7243 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c @@ -230,7 +230,10 @@ static int qede_get_sset_count(struct net_device *dev, int stringset) case ETH_SS_PRIV_FLAGS: return QEDE_PRI_FLAG_LEN; case ETH_SS_TEST: - return QEDE_ETHTOOL_TEST_MAX; + if (!IS_VF(edev)) + return QEDE_ETHTOOL_TEST_MAX; + else + return 0; default: DP_VERBOSE(edev, QED_MSG_DEBUG, "Unsupported stringset 0x%08x\n", stringset); |