[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210119004028.2809425-5-vinicius.gomes@intel.com>
Date: Mon, 18 Jan 2021 16:40:24 -0800
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: netdev@...r.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us, kuba@...nel.org,
m-karicheri2@...com, vladimir.oltean@....com,
Jose.Abreu@...opsys.com, po.liu@....com,
intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com,
mkubecek@...e.cz
Subject: [PATCH net-next v2 4/8] igc: Only dump registers if configured to dump HW information
To avoid polluting the users logs with register dumps, only dump the
adapter's registers if configured to do so.
If users want to enable HW status messages they can do:
$ ethtool -s IFACE msglvl hw on
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
---
drivers/net/ethernet/intel/igc/igc_dump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/igc/igc_dump.c b/drivers/net/ethernet/intel/igc/igc_dump.c
index 4b9ec7d0b727..90b754b429ff 100644
--- a/drivers/net/ethernet/intel/igc/igc_dump.c
+++ b/drivers/net/ethernet/intel/igc/igc_dump.c
@@ -308,6 +308,9 @@ void igc_regs_dump(struct igc_adapter *adapter)
struct igc_hw *hw = &adapter->hw;
struct igc_reg_info *reginfo;
+ if (!netif_msg_hw(adapter))
+ return;
+
/* Print Registers */
netdev_info(adapter->netdev, "Register Dump\n");
netdev_info(adapter->netdev, "Register Name Value\n");
--
2.30.0
Powered by blists - more mailing lists