From patchwork Wed Dec 2 04:53:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Costa Gomes X-Patchwork-Id: 1409298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cm67X3JLlz9sVx for ; Wed, 2 Dec 2020 15:53:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CF1E58781D; Wed, 2 Dec 2020 04:53:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SuaFj5NCWB1I; Wed, 2 Dec 2020 04:53:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 278A187816; Wed, 2 Dec 2020 04:53:54 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D39791BF30A for ; Wed, 2 Dec 2020 04:53:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C97E1878D6 for ; Wed, 2 Dec 2020 04:53:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L3feHNwq15eh for ; Wed, 2 Dec 2020 04:53:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5A94F87886 for ; Wed, 2 Dec 2020 04:53:51 +0000 (UTC) IronPort-SDR: E0tY4T2puWQbJQesGjzvef909GL/qHCt0wLJTy+nHnALOOzD4NZ9dmZZsxhoWz0SdemZZxoJQX KOJX/a88SMjQ== X-IronPort-AV: E=McAfee;i="6000,8403,9822"; a="234558819" X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="234558819" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 20:53:49 -0800 IronPort-SDR: 1rSTdOIIXv890nNG4Q4YJsPOSGtf6FT0SovW3Ac16DuCvelHLyL1Oad0ZPOP93R4ZlwgcjTkV0 pyDjV4XAxACQ== X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="549888374" Received: from shivanif-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.212.152.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 20:53:48 -0800 From: Vinicius Costa Gomes To: netdev@vger.kernel.org Date: Tue, 1 Dec 2020 20:53:20 -0800 Message-Id: <20201202045325.3254757-5-vinicius.gomes@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201202045325.3254757-1-vinicius.gomes@intel.com> References: <20201202045325.3254757-1-vinicius.gomes@intel.com> MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH net-next v1 4/9] igc: Only dump registers if configured to dump HW information X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose.Abreu@synopsys.com, jiri@resnulli.us, vladimir.oltean@nxp.com, po.liu@nxp.com, jhs@mojatatu.com, m-karicheri2@ti.com, intel-wired-lan@lists.osuosl.org, kuba@kernel.org, xiyou.wangcong@gmail.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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 --- 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");