netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net 3/8] qede: Don't expose self-test for VFs
Date: Thu, 26 May 2016 11:01:19 +0300	[thread overview]
Message-ID: <1464249684-976-4-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1464249684-976-1-git-send-email-Yuval.Mintz@qlogic.com>

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>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 1bc7535..ad3cae3 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);
-- 
1.9.3

  parent reply	other threads:[~2016-05-26  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  8:01 [PATCH net 0/8] qed*: Bug fixes Yuval Mintz
2016-05-26  8:01 ` [PATCH net 1/8] qede: Fix VF minimum BW setting Yuval Mintz
2016-05-26  8:01 ` [PATCH net 2/8] qede: Reload on GRO changes Yuval Mintz
2016-05-26  8:01 ` Yuval Mintz [this message]
2016-05-26  8:01 ` [PATCH net 4/8] qed: Fix allocation in interrupt context Yuval Mintz
2016-05-26  8:01 ` [PATCH net 5/8] qed: Save min/max accross dcbx-change Yuval Mintz
2016-05-26  8:01 ` [PATCH net 6/8] qed: Add missing 100g init mode Yuval Mintz
2016-05-26  8:01 ` [PATCH net 7/8] qed: Prevent 100g from working in MSI Yuval Mintz
2016-05-26  8:01 ` [PATCH net 8/8] qed: Don't config min BW on 100g on link flap Yuval Mintz
2016-05-26 19:30 ` [PATCH net 0/8] qed*: Bug fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464249684-976-4-git-send-email-Yuval.Mintz@qlogic.com \
    --to=yuval.mintz@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).