netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 01/12] i40e: restrict diag test messages
Date: Tue, 10 Dec 2013 02:22:30 -0800	[thread overview]
Message-ID: <1386670961-20392-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1386670961-20392-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Shannon Nelson <shannon.nelson@intel.com>

Use the netif_info() macro to restrict messaging to when the HW
bit is enabled in the msglvl netdev message mask.

Change-Id: I83030d4402991cfb7da100da00f05ce502ada4ae
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index f0bab17..b04e433 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -711,7 +711,7 @@ static int i40e_link_test(struct net_device *netdev, u64 *data)
 	struct i40e_netdev_priv *np = netdev_priv(netdev);
 	struct i40e_pf *pf = np->vsi->back;
 
-	netdev_info(netdev, "link test\n");
+	netif_info(pf, hw, netdev, "link test\n");
 	if (i40e_get_link_status(&pf->hw))
 		*data = 0;
 	else
@@ -725,7 +725,7 @@ static int i40e_reg_test(struct net_device *netdev, u64 *data)
 	struct i40e_netdev_priv *np = netdev_priv(netdev);
 	struct i40e_pf *pf = np->vsi->back;
 
-	netdev_info(netdev, "register test\n");
+	netif_info(pf, hw, netdev, "register test\n");
 	*data = i40e_diag_reg_test(&pf->hw);
 
 	i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));
@@ -737,7 +737,7 @@ static int i40e_eeprom_test(struct net_device *netdev, u64 *data)
 	struct i40e_netdev_priv *np = netdev_priv(netdev);
 	struct i40e_pf *pf = np->vsi->back;
 
-	netdev_info(netdev, "eeprom test\n");
+	netif_info(pf, hw, netdev, "eeprom test\n");
 	*data = i40e_diag_eeprom_test(&pf->hw);
 
 	return *data;
@@ -749,7 +749,7 @@ static int i40e_intr_test(struct net_device *netdev, u64 *data)
 	struct i40e_pf *pf = np->vsi->back;
 	u16 swc_old = pf->sw_int_count;
 
-	netdev_info(netdev, "interrupt test\n");
+	netif_info(pf, hw, netdev, "interrupt test\n");
 	wr32(&pf->hw, I40E_PFINT_DYN_CTL0,
 	     (I40E_PFINT_DYN_CTL0_INTENA_MASK |
 	      I40E_PFINT_DYN_CTL0_SWINT_TRIG_MASK));
@@ -761,7 +761,10 @@ static int i40e_intr_test(struct net_device *netdev, u64 *data)
 
 static int i40e_loopback_test(struct net_device *netdev, u64 *data)
 {
-	netdev_info(netdev, "loopback test not implemented\n");
+	struct i40e_netdev_priv *np = netdev_priv(netdev);
+	struct i40e_pf *pf = np->vsi->back;
+
+	netif_info(pf, hw, netdev, "loopback test not implemented\n");
 	*data = 0;
 
 	return *data;
@@ -776,8 +779,7 @@ static void i40e_diag_test(struct net_device *netdev,
 	set_bit(__I40E_TESTING, &pf->state);
 	if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
 		/* Offline tests */
-
-		netdev_info(netdev, "offline testing starting\n");
+		netif_info(pf, drv, netdev, "offline testing starting\n");
 
 		/* Link test performed before hardware reset
 		 * so autoneg doesn't interfere with test result
@@ -798,8 +800,9 @@ static void i40e_diag_test(struct net_device *netdev,
 			eth_test->flags |= ETH_TEST_FL_FAILED;
 
 	} else {
-		netdev_info(netdev, "online test starting\n");
 		/* Online tests */
+		netif_info(pf, drv, netdev, "online testing starting\n");
+
 		if (i40e_link_test(netdev, &data[I40E_ETH_TEST_LINK]))
 			eth_test->flags |= ETH_TEST_FL_FAILED;
 
@@ -811,7 +814,7 @@ static void i40e_diag_test(struct net_device *netdev,
 	}
 	clear_bit(__I40E_TESTING, &pf->state);
 
-	netdev_info(netdev, "testing finished\n");
+	netif_info(pf, drv, netdev, "testing finished\n");
 }
 
 static void i40e_get_wol(struct net_device *netdev,
-- 
1.8.3.1

  reply	other threads:[~2013-12-10 10:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 10:22 [net-next 00/12][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-12-10 10:22 ` Jeff Kirsher [this message]
2013-12-10 10:22 ` [net-next 02/12] i40e: loopback info and set loopback fix Jeff Kirsher
2013-12-10 10:22 ` [net-next 03/12] i40e: complain about out-of-range descriptor request Jeff Kirsher
2013-12-10 10:22 ` [net-next 04/12] i40e: remove and fix confusing define name Jeff Kirsher
2013-12-10 10:22 ` [net-next 05/12] i40e: Bump version number Jeff Kirsher
2013-12-10 10:22 ` [net-next 06/12] ixgbevf: update Kconfig description Jeff Kirsher
2013-12-10 10:22 ` [net-next 07/12] ixgbe: Focus config of head, tail ntc, and ntu all into a single function Jeff Kirsher
2013-12-10 10:22 ` [net-next 08/12] igb: Add media switching feature for i354 PHY's Jeff Kirsher
2013-12-10 10:22 ` [net-next 09/12] igb: Support ports mapped in 64-bit PCI space Jeff Kirsher
2013-12-10 10:22 ` [net-next 10/12] igb: Add new feature Media Auto Sense for 82580 devices only Jeff Kirsher
2013-12-10 10:22 ` [net-next 11/12] igb: Convert to use devm_hwmon_device_register_with_groups Jeff Kirsher
2013-12-10 10:22 ` [net-next 12/12] igb: Start temperature sensor attribute index with 1 Jeff Kirsher
2013-12-11  2:30 ` [net-next 00/12][pull request] Intel Wired LAN Driver Updates 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=1386670961-20392-2-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.com \
    /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).