Commit 6ecb0a0c authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

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: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce2b885c
...@@ -230,7 +230,10 @@ static int qede_get_sset_count(struct net_device *dev, int stringset) ...@@ -230,7 +230,10 @@ static int qede_get_sset_count(struct net_device *dev, int stringset)
case ETH_SS_PRIV_FLAGS: case ETH_SS_PRIV_FLAGS:
return QEDE_PRI_FLAG_LEN; return QEDE_PRI_FLAG_LEN;
case ETH_SS_TEST: case ETH_SS_TEST:
if (!IS_VF(edev))
return QEDE_ETHTOOL_TEST_MAX; return QEDE_ETHTOOL_TEST_MAX;
else
return 0;
default: default:
DP_VERBOSE(edev, QED_MSG_DEBUG, DP_VERBOSE(edev, QED_MSG_DEBUG,
"Unsupported stringset 0x%08x\n", stringset); "Unsupported stringset 0x%08x\n", stringset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment