Skip to content

Commit 6ecb0a0

Browse files
Yuval Mintzdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ce2b885 commit 6ecb0a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/qlogic/qede/qede_ethtool.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ static int qede_get_sset_count(struct net_device *dev, int stringset)
230230
case ETH_SS_PRIV_FLAGS:
231231
return QEDE_PRI_FLAG_LEN;
232232
case ETH_SS_TEST:
233-
return QEDE_ETHTOOL_TEST_MAX;
233+
if (!IS_VF(edev))
234+
return QEDE_ETHTOOL_TEST_MAX;
235+
else
236+
return 0;
234237
default:
235238
DP_VERBOSE(edev, QED_MSG_DEBUG,
236239
"Unsupported stringset 0x%08x\n", stringset);

0 commit comments

Comments
 (0)