From patchwork Thu Feb 4 00:42:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065887 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FCE1C433DB for ; Thu, 4 Feb 2021 00:44:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6515F64F58 for ; Thu, 4 Feb 2021 00:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234521AbhBDAoZ (ORCPT ); Wed, 3 Feb 2021 19:44:25 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234513AbhBDAnx (ORCPT ); Wed, 3 Feb 2021 19:43:53 -0500 IronPort-SDR: SY4Rwr29nO9jyFZhi6cVd0Uu09ah/xsKrKz+sL+8lpYgKemjWKCHfHNYtJFTZP1/WX4jCIK1h7 ad3jM7SBmHig== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638222" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638222" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:12 -0800 IronPort-SDR: bk/lKja0xiT27dlAH+ZNfZCKk/bgg48izMX4tj3lGAS7pbTXzmA2+ybvOIDtQ9kezelmA1+czc hIduRab/sxbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687476" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:12 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 01/15] igc: Clean up nvm_operations structure Date: Wed, 3 Feb 2021 16:42:45 -0800 Message-Id: <20210204004259.3662059-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin valid_led_default function pointer not in use and can be removed from nvm_operations structure. Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_hw.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h index 9da5f83ce456..4461f8b9a864 100644 --- a/drivers/net/ethernet/intel/igc/igc_hw.h +++ b/drivers/net/ethernet/intel/igc/igc_hw.h @@ -113,7 +113,6 @@ struct igc_nvm_operations { s32 (*write)(struct igc_hw *hw, u16 offset, u16 i, u16 *data); s32 (*update)(struct igc_hw *hw); s32 (*validate)(struct igc_hw *hw); - s32 (*valid_led_default)(struct igc_hw *hw, u16 *data); }; struct igc_phy_operations { From patchwork Thu Feb 4 00:42:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065881 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FAFEC433DB for ; Thu, 4 Feb 2021 00:43:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04FCF64F4C for ; Thu, 4 Feb 2021 00:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234484AbhBDAn1 (ORCPT ); Wed, 3 Feb 2021 19:43:27 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234277AbhBDAm4 (ORCPT ); Wed, 3 Feb 2021 19:42:56 -0500 IronPort-SDR: oJMlxZXmp0lGMxMfjagw0vv1hGVAPZg3rAH4wvfNMwJ2euFwq0XB3VMxpl66HTEVR6pVoHKtQ/ P+nvGV6r6uGg== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638223" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638223" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:12 -0800 IronPort-SDR: wjKLhrvLbd07WoDeao8qdH5DzdjsPaRS/6pZSYNQ2CpvXhiCcFQcYFxEH8N4fnxNZnnbOnfcvO AQcZA9PNjXlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687479" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:12 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 02/15] igc: Remove igc_set_fw_version comment Date: Wed, 3 Feb 2021 16:42:46 -0800 Message-Id: <20210204004259.3662059-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin i225 device not supported and do not plan to support configuration of fw version string for ethtool Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index ec8cd69d4992..29da2710b500 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -544,7 +544,6 @@ static int igc_ethtool_set_eeprom(struct net_device *netdev, if (ret_val == 0) hw->nvm.ops.update(hw); - /* check if need: igc_set_fw_version(adapter); */ kfree(eeprom_buff); return ret_val; } From patchwork Thu Feb 4 00:42:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065917 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 846E8C433E6 for ; Thu, 4 Feb 2021 00:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 377ED64F5C for ; Thu, 4 Feb 2021 00:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234475AbhBDAuh (ORCPT ); Wed, 3 Feb 2021 19:50:37 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234463AbhBDAnM (ORCPT ); Wed, 3 Feb 2021 19:43:12 -0500 IronPort-SDR: 1EvWJkmvoUhelhLG9NpRP3t+nm6kZQocexsK30LmlLwU42q8VPXS4PJIv5NG97L9d6iVLvae7y DterMFw9HdBg== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638225" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638225" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: 2rCP06ghCGsroEKqJtsXpQTtDZ7ztFtOPaUvpqL8QZWuQzFg/YleLyeanFlwta9tIU9dX6ZktB w4KoIk3l68UQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687484" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:12 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 03/15] igc: Remove MULR mask define Date: Wed, 3 Feb 2021 16:42:47 -0800 Message-Id: <20210204004259.3662059-4-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Multiple Tx Data Read Requests is hardware pipeline feature and is not controlled by software Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 32f5fd684139..6cc958031fce 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -284,7 +284,6 @@ #define IGC_TCTL_CT 0x00000ff0 /* collision threshold */ #define IGC_TCTL_COLD 0x003ff000 /* collision distance */ #define IGC_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ -#define IGC_TCTL_MULR 0x10000000 /* Multiple request support */ /* Flow Control Constants */ #define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 From patchwork Thu Feb 4 00:42:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065883 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BDDFC433E0 for ; Thu, 4 Feb 2021 00:44:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2D9164F58 for ; Thu, 4 Feb 2021 00:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234227AbhBDAoH (ORCPT ); Wed, 3 Feb 2021 19:44:07 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234488AbhBDAna (ORCPT ); Wed, 3 Feb 2021 19:43:30 -0500 IronPort-SDR: 6d9adVLgwVxaw9PoKZ0NMj74bpaHClB1P7zH+fqcWTqvDQXqL9WQkT5ta+mbB9/dMB5OqiUV4w Wya+KI6JTVaA== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638226" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638226" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: F/106Ule2nmgHFfuyKCr9CXALfjGkzRuzvi6Bf9wc5i5eLqViyjkkamUgGCU4PaUC6vE37HHOP GHXmV0shcGmw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687487" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 04/15] igc: Add Host Good Packets Transmitted Count Date: Wed, 3 Feb 2021 16:42:48 -0800 Message-Id: <20210204004259.3662059-5-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin This counter counts the number of good (non-erred) packets transmitted sent by the host. A good transmit packet is considered one that is 64 or more bytes in length (from through , inclusively) in length Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 43aec42e6d9d..e26ec0c82271 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -3674,6 +3674,7 @@ void igc_update_stats(struct igc_adapter *adapter) adapter->stats.prc1522 += rd32(IGC_PRC1522); adapter->stats.tlpic += rd32(IGC_TLPIC); adapter->stats.rlpic += rd32(IGC_RLPIC); + adapter->stats.hgptc += rd32(IGC_HGPTC); mpc = rd32(IGC_MPC); adapter->stats.mpc += mpc; From patchwork Thu Feb 4 00:42:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065891 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9E83C433DB for ; Thu, 4 Feb 2021 00:45:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9423A64DF0 for ; Thu, 4 Feb 2021 00:45:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234565AbhBDApM (ORCPT ); Wed, 3 Feb 2021 19:45:12 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234494AbhBDAn6 (ORCPT ); Wed, 3 Feb 2021 19:43:58 -0500 IronPort-SDR: j23RGbFCo7OSEIloqS7WcY78cBSuZf/fZ7EJ9yfYkNrQETnrTbewwTsbM+QFMYPYiQ5/tmKITu dOs1rN+diK3A== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638227" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638227" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: 8cnYR27mmjbv2j26TlxMGqeQWSlfrqeugyQMGZRCPAE55fR9ctJY10uWF/CI+mrj9oZWJFjOya +VdpEDTEEdvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687490" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 05/15] igc: Expose the NVM version Date: Wed, 3 Feb 2021 16:42:49 -0800 Message-Id: <20210204004259.3662059-6-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Expose the NVM map version via drvinfo in ethtool NVM image version is reported as firmware version for i225 device Minor typo fix - remove space Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc.h | 2 ++ drivers/net/ethernet/intel/igc/igc_defines.h | 1 + drivers/net/ethernet/intel/igc/igc_ethtool.c | 16 ++++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 35baae900c1f..2d8b1716a20c 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -217,6 +217,8 @@ struct igc_adapter { struct timecounter tc; struct timespec64 prev_ptp_time; /* Pre-reset PTP clock */ ktime_t ptp_reset_start; /* Reset time in clock mono */ + + char fw_version[16]; }; void igc_up(struct igc_adapter *adapter); diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 6cc958031fce..4b7251d0c4e1 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -160,6 +160,7 @@ #define IGC_NVM_RW_REG_START 1 /* Start operation */ #define IGC_NVM_RW_ADDR_SHIFT 2 /* Shift to the address bits */ #define IGC_NVM_POLL_READ 0 /* Flag for polling for read complete */ +#define IGC_NVM_DEV_STARTER 5 /* Dev_starter Version */ /* NVM Word Offsets */ #define NVM_CHECKSUM_REG 0x003F diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 29da2710b500..7dd1ca7f3ed5 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -129,10 +129,22 @@ static void igc_ethtool_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) { struct igc_adapter *adapter = netdev_priv(netdev); + struct igc_hw *hw = &adapter->hw; + u16 nvm_version = 0; + + strscpy(drvinfo->driver, igc_driver_name, sizeof(drvinfo->driver)); + + /* NVM image version is reported as firmware version for i225 device */ + hw->nvm.ops.read(hw, IGC_NVM_DEV_STARTER, 1, &nvm_version); + + scnprintf(adapter->fw_version, + sizeof(adapter->fw_version), + "%x", + nvm_version); - strlcpy(drvinfo->driver, igc_driver_name, sizeof(drvinfo->driver)); + strscpy(drvinfo->fw_version, adapter->fw_version, + sizeof(drvinfo->fw_version)); - /* add fw_version here */ strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info)); From patchwork Thu Feb 4 00:42:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065909 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78CE4C433E6 for ; Thu, 4 Feb 2021 00:47:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4679C64F4C for ; Thu, 4 Feb 2021 00:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234409AbhBDAre (ORCPT ); Wed, 3 Feb 2021 19:47:34 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234526AbhBDAo1 (ORCPT ); Wed, 3 Feb 2021 19:44:27 -0500 IronPort-SDR: 6F7B1A4htiN1dBM6MUWqZ3Jyv+BAdH+HvBSc6CiRWFM+prxvZ5fKlH0ZV4NuOliUE57Bkl/pC/ we2uMxlEz7Tw== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638228" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638228" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: YV3bQcCx9cOQjbCVEm9aieSfiHUS9k89RxW8oggIZWCGY4jlQ4f8wJFibTz3WWLIMsXOlo4uKJ hTtgXot/rYVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687493" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 06/15] igc: Expose the gPHY firmware version Date: Wed, 3 Feb 2021 16:42:50 -0800 Message-Id: <20210204004259.3662059-7-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Extend reporting of NVM image version to include the gPHY (i225 PHY) firmware version. Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc.h | 2 +- drivers/net/ethernet/intel/igc/igc_ethtool.c | 9 +++++++-- drivers/net/ethernet/intel/igc/igc_phy.c | 18 ++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_phy.h | 1 + drivers/net/ethernet/intel/igc/igc_regs.h | 1 + 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 2d8b1716a20c..5d2809dfd06a 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -218,7 +218,7 @@ struct igc_adapter { struct timespec64 prev_ptp_time; /* Pre-reset PTP clock */ ktime_t ptp_reset_start; /* Reset time in clock mono */ - char fw_version[16]; + char fw_version[32]; }; void igc_up(struct igc_adapter *adapter); diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 7dd1ca7f3ed5..a3811d7e59bc 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -131,16 +131,21 @@ static void igc_ethtool_get_drvinfo(struct net_device *netdev, struct igc_adapter *adapter = netdev_priv(netdev); struct igc_hw *hw = &adapter->hw; u16 nvm_version = 0; + u16 gphy_version; strscpy(drvinfo->driver, igc_driver_name, sizeof(drvinfo->driver)); /* NVM image version is reported as firmware version for i225 device */ hw->nvm.ops.read(hw, IGC_NVM_DEV_STARTER, 1, &nvm_version); + /* gPHY firmware version is reported as PHY FW version */ + gphy_version = igc_read_phy_fw_version(hw); + scnprintf(adapter->fw_version, sizeof(adapter->fw_version), - "%x", - nvm_version); + "%x:%x", + nvm_version, + gphy_version); strscpy(drvinfo->fw_version, adapter->fw_version, sizeof(drvinfo->fw_version)); diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c index 8e1799508edc..83aeb5e7076f 100644 --- a/drivers/net/ethernet/intel/igc/igc_phy.c +++ b/drivers/net/ethernet/intel/igc/igc_phy.c @@ -791,3 +791,21 @@ s32 igc_read_phy_reg_gpy(struct igc_hw *hw, u32 offset, u16 *data) return ret_val; } + +/** + * igc_read_phy_fw_version - Read gPHY firmware version + * @hw: pointer to the HW structure + */ +u16 igc_read_phy_fw_version(struct igc_hw *hw) +{ + struct igc_phy_info *phy = &hw->phy; + u16 gphy_version = 0; + u16 ret_val; + + /* NVM image version is reported as firmware version for i225 device */ + ret_val = phy->ops.read_reg(hw, IGC_GPHY_VERSION, &gphy_version); + if (ret_val) + hw_dbg("igc_phy: read wrong gphy version\n"); + + return gphy_version; +} diff --git a/drivers/net/ethernet/intel/igc/igc_phy.h b/drivers/net/ethernet/intel/igc/igc_phy.h index 25cba33de7e2..1b031372d206 100644 --- a/drivers/net/ethernet/intel/igc/igc_phy.h +++ b/drivers/net/ethernet/intel/igc/igc_phy.h @@ -17,5 +17,6 @@ void igc_power_up_phy_copper(struct igc_hw *hw); void igc_power_down_phy_copper(struct igc_hw *hw); s32 igc_write_phy_reg_gpy(struct igc_hw *hw, u32 offset, u16 data); s32 igc_read_phy_reg_gpy(struct igc_hw *hw, u32 offset, u16 *data); +u16 igc_read_phy_fw_version(struct igc_hw *hw); #endif diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h index b52dd9d737e8..3e5cb7aef9da 100644 --- a/drivers/net/ethernet/intel/igc/igc_regs.h +++ b/drivers/net/ethernet/intel/igc/igc_regs.h @@ -13,6 +13,7 @@ #define IGC_MDICNFG 0x00E04 /* MDC/MDIO Configuration - RW */ #define IGC_CONNSW 0x00034 /* Copper/Fiber switch control - RW */ #define IGC_I225_PHPM 0x00E14 /* I225 PHY Power Management */ +#define IGC_GPHY_VERSION 0x0001E /* I225 gPHY Firmware Version */ /* Internal Packet Buffer Size Registers */ #define IGC_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */ From patchwork Thu Feb 4 00:42:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065911 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73894C433E0 for ; Thu, 4 Feb 2021 00:48:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36C2E64E0F for ; Thu, 4 Feb 2021 00:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234518AbhBDArv (ORCPT ); Wed, 3 Feb 2021 19:47:51 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234397AbhBDAoc (ORCPT ); Wed, 3 Feb 2021 19:44:32 -0500 IronPort-SDR: T61OxW5m5I4yGIkkOCu3BU7CAVcL7HyHJAAYzlPgwuHoyzRBK6os+XnpXjqzUttHfLPhIWHn6U Chxv+5JPmTSA== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638229" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638229" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: i7U+1lMwQbjB5ROnAMK1XWJcEyddOk95K6bq0DiUiAYU6OZW4WqxunT5Ktu6IXHXsHRYkJ1NDc PsNARKbh/BCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687496" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 07/15] igc: Prefer strscpy over strlcpy Date: Wed, 3 Feb 2021 16:42:51 -0800 Message-Id: <20210204004259.3662059-8-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Use the strscpy method instead of strlcpy method. See: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr _i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index a3811d7e59bc..824a6c454bca 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -150,7 +150,7 @@ static void igc_ethtool_get_drvinfo(struct net_device *netdev, strscpy(drvinfo->fw_version, adapter->fw_version, sizeof(drvinfo->fw_version)); - strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), + strscpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info)); drvinfo->n_priv_flags = IGC_PRIV_FLAGS_STR_LEN; From patchwork Thu Feb 4 00:42:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065919 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8B52C433E0 for ; Thu, 4 Feb 2021 00:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59AF064F58 for ; Thu, 4 Feb 2021 00:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234489AbhBDAus (ORCPT ); Wed, 3 Feb 2021 19:50:48 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234464AbhBDAnM (ORCPT ); Wed, 3 Feb 2021 19:43:12 -0500 IronPort-SDR: +ntW3wFuE14yHIsD7eMu1EMJ4PNCekHBi7sYuR8SwXgyX7qVgFeo2aUAHEeOsC1ASgzuVSJjzy PBPHTdGUE5tw== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638231" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638231" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:13 -0800 IronPort-SDR: 4O6ZpMLYjINZY+lV6Z0Ncp67uw0RlTl8haoq/6nMvPZHFK04awUa7n8cnC5T8cX6xkTEAg98bs nqM5FD30Yp4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687500" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 08/15] igc: Remove unused local receiver mask Date: Wed, 3 Feb 2021 16:42:52 -0800 Message-Id: <20210204004259.3662059-9-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Local receiver mask SR_1000T_LOCAL_RX_STATUS not in use in i225 device and could be removed Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 4b7251d0c4e1..5286047ff914 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -129,7 +129,6 @@ /* 1000BASE-T Status Register */ #define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */ -#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */ /* PHY GPY 211 registers */ #define STANDARD_AN_REG_MASK 0x0007 /* MMD */ From patchwork Thu Feb 4 00:42:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065885 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30D99C433DB for ; Thu, 4 Feb 2021 00:44:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC8FD64F4C for ; Thu, 4 Feb 2021 00:44:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234394AbhBDAnt (ORCPT ); Wed, 3 Feb 2021 19:43:49 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234486AbhBDAna (ORCPT ); Wed, 3 Feb 2021 19:43:30 -0500 IronPort-SDR: mjW+XYWtja2zFRlqTRRead7TSuBnhszZYiCxCAR+JpJOraTsYr5l4ETz84VXYaB0eNy/fo46n4 XftBONMWBniQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638232" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638232" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:14 -0800 IronPort-SDR: pvjDKw5cbgV70X1haLxTNG1ZPNLotA8Xsp8ktGn3AowpWZptbHWWvIn4ORntbXgkq3Viss7enM kcoQeZArztGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687504" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:13 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 09/15] igc: Remove unused FUNC_1 mask Date: Wed, 3 Feb 2021 16:42:53 -0800 Message-Id: <20210204004259.3662059-10-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin FUNC_1 mask not in use in i225 device and could be removed Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 5286047ff914..b909f00a79e6 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -179,7 +179,6 @@ #define IGC_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ #define IGC_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ #define IGC_STATUS_FUNC_SHIFT 2 -#define IGC_STATUS_FUNC_1 0x00000004 /* Function 1 */ #define IGC_STATUS_TXOFF 0x00000010 /* transmission paused */ #define IGC_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ #define IGC_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ From patchwork Thu Feb 4 00:42:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065915 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E02EC433DB for ; Thu, 4 Feb 2021 00:50:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6BF164F58 for ; Thu, 4 Feb 2021 00:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbhBDAuN (ORCPT ); Wed, 3 Feb 2021 19:50:13 -0500 Received: from mga11.intel.com ([192.55.52.93]:40083 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234506AbhBDAni (ORCPT ); Wed, 3 Feb 2021 19:43:38 -0500 IronPort-SDR: 6UIlcZGi+pMwxYJ5g9nCFaR01WdeF79Jbo7JWQeC8VmBKIbw7n9mYaW5PprhqNswTnEQJJymdD tiq8iwnu/uvg== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638234" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638234" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:14 -0800 IronPort-SDR: lfvISThLfS9aJi+lQkdNPqLti85BglPNM8PjzrmCH0HpasAfEC5UjRvNBHMrLSycnVDCzf8Qyw qxhjli1yw0dA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687508" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Gal Hammer Subject: [PATCH net-next 10/15] igc: Fix TDBAL register show incorrect value Date: Wed, 3 Feb 2021 16:42:54 -0800 Message-Id: <20210204004259.3662059-11-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sasha Neftin Fixed a typo which caused the registers dump function to read the RDBAL register when printing TDBAL register values. _reg_dump method has been partially derived from i210 and have same typo. Suggested-by: Gal Hammer Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_dump.c b/drivers/net/ethernet/intel/igc/igc_dump.c index 4b9ec7d0b727..495bed47ed0a 100644 --- a/drivers/net/ethernet/intel/igc/igc_dump.c +++ b/drivers/net/ethernet/intel/igc/igc_dump.c @@ -75,7 +75,7 @@ static void igc_regdump(struct igc_hw *hw, struct igc_reg_info *reginfo) break; case IGC_TDBAL(0): for (n = 0; n < 4; n++) - regs[n] = rd32(IGC_RDBAL(n)); + regs[n] = rd32(IGC_TDBAL(n)); break; case IGC_TDBAH(0): for (n = 0; n < 4; n++) From patchwork Thu Feb 4 00:42:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065889 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22AFEC433DB for ; Thu, 4 Feb 2021 00:45:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CED0164F4C for ; Thu, 4 Feb 2021 00:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234398AbhBDAo4 (ORCPT ); Wed, 3 Feb 2021 19:44:56 -0500 Received: from mga11.intel.com ([192.55.52.93]:40083 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234327AbhBDAoH (ORCPT ); Wed, 3 Feb 2021 19:44:07 -0500 IronPort-SDR: +XTLdeYahUIMz/OQyjm+m0lVN6K7i2Wh1Zg+7NCgs5hLdjKDgqOgy1/twmrsCw+3mEpRjZBF+M fC9e4Ou1Cofg== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638235" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638235" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:14 -0800 IronPort-SDR: 560kuMKkwJwq0b14t5fdUKeu+4oENZo06nBCQUsJBenHdceYLeRSj9ChKqQ8xVwt2LWv+jW+D8 Ug+bIL3i8RAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687512" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Gal Hammer , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, David Switzer Subject: [PATCH net-next 11/15] igb: fix TDBAL register show incorrect value Date: Wed, 3 Feb 2021 16:42:55 -0800 Message-Id: <20210204004259.3662059-12-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Gal Hammer Fixed a typo which caused the registers dump function to read the RDBAL register when printing TDBAL register values. Signed-off-by: Gal Hammer Tested-by: David Switzer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 84d4284b8b32..d6090faaa41d 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -316,7 +316,7 @@ static void igb_regdump(struct e1000_hw *hw, struct igb_reg_info *reginfo) break; case E1000_TDBAL(0): for (n = 0; n < 4; n++) - regs[n] = rd32(E1000_RDBAL(n)); + regs[n] = rd32(E1000_TDBAL(n)); break; case E1000_TDBAH(0): for (n = 0; n < 4; n++) From patchwork Thu Feb 4 00:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065893 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7940C433DB for ; Thu, 4 Feb 2021 00:45:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DF9C64F4C for ; Thu, 4 Feb 2021 00:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234559AbhBDApd (ORCPT ); Wed, 3 Feb 2021 19:45:33 -0500 Received: from mga11.intel.com ([192.55.52.93]:40083 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234542AbhBDApH (ORCPT ); Wed, 3 Feb 2021 19:45:07 -0500 IronPort-SDR: 355zVrd135Zh7AGknIoE8XRI3JDNza/ICpDMu3dkkhJCtWDONOC2gWXqc53+U9uzuCz8DmjSs6 rme7YM4E/Sng== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638236" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638236" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:14 -0800 IronPort-SDR: 2gaFeZ36vMF1Ecub6eoLv7BWa3tGN9G1ozV6Sv6d+eg4zTzJ3aMd+Y/XA2xK/2jtTCvoZBJJyP hwIzJ2eoGG+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687515" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Nick Lowe , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, David Switzer Subject: [PATCH net-next 12/15] igb: Enable RSS for Intel I211 Ethernet Controller Date: Wed, 3 Feb 2021 16:42:56 -0800 Message-Id: <20210204004259.3662059-13-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Nick Lowe The Intel I211 Ethernet Controller supports 2 Receive Side Scaling (RSS) queues. It should not be excluded from having this feature enabled. Via commit c883de9fd787 ("igb: rename igb define to be more generic") E1000_MRQC_ENABLE_RSS_4Q was renamed to E1000_MRQC_ENABLE_RSS_MQ to indicate that this is a generic bit flag to enable queues and not a flag that is specific to devices that support 4 queues The bit flag enables 2, 4 or 8 queues appropriately depending on the part. Tested with a multicore CPU and frames were then distributed as expected. This issue appears to have been introduced because of confusion caused by the prior name. Signed-off-by: Nick Lowe Tested-by: David Switzer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index d6090faaa41d..23e50de94474 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -4482,8 +4482,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter) else mrqc |= E1000_MRQC_ENABLE_VMDQ; } else { - if (hw->mac.type != e1000_i211) - mrqc |= E1000_MRQC_ENABLE_RSS_MQ; + mrqc |= E1000_MRQC_ENABLE_RSS_MQ; } igb_vmm_control(adapter); From patchwork Thu Feb 4 00:42:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065897 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0542EC433E0 for ; Thu, 4 Feb 2021 00:46:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6D2664F58 for ; Thu, 4 Feb 2021 00:46:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234571AbhBDApz (ORCPT ); Wed, 3 Feb 2021 19:45:55 -0500 Received: from mga11.intel.com ([192.55.52.93]:40021 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234567AbhBDApa (ORCPT ); Wed, 3 Feb 2021 19:45:30 -0500 IronPort-SDR: 2FalntsixpTMB1Vkh6LjXWKkMRzGZtMHQPSiI+gz1C2GNlhIt7T5Vdm/SjplfQ9OqcpiVy+LZw ZCAVAC6k324Q== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638237" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638237" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:14 -0800 IronPort-SDR: Q2GYiARGyG0kYLJM3uScxcYCt3lf6EqFOQxb3IIOEXHUw9Kt/GKmHrcg9n8uyxdAmkMNIsC+Uy 7Jw+Mke62tEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687519" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Tom Rix , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com Subject: [PATCH net-next 13/15] igb: remove h from printk format specifier Date: Wed, 3 Feb 2021 16:42:57 -0800 Message-Id: <20210204004259.3662059-14-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Tom Rix This change fixes the checkpatch warning described in this commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]") Standard integer promotion is already done and %hx and %hhx is useless so do not encourage the use of %hh[xudi] or %h[xudi]. Signed-off-by: Tom Rix Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 23e50de94474..bd0594ac3ae7 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -3156,7 +3156,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * the PCIe SR-IOV capability. */ if (pdev->is_virtfn) { - WARN(1, KERN_ERR "%s (%hx:%hx) should not be a VF!\n", + WARN(1, KERN_ERR "%s (%x:%x) should not be a VF!\n", pci_name(pdev), pdev->vendor, pdev->device); return -EINVAL; } From patchwork Thu Feb 4 00:42:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065895 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2585EC433DB for ; Thu, 4 Feb 2021 00:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D085A64F4C for ; Thu, 4 Feb 2021 00:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234312AbhBDApr (ORCPT ); Wed, 3 Feb 2021 19:45:47 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234544AbhBDApa (ORCPT ); Wed, 3 Feb 2021 19:45:30 -0500 IronPort-SDR: gBq5+ztzBvabFFcHnHfrsXbuWJjpol+3pTi7MNVdCITmbo8DPpiNAFe4jB60dwDThldR3hPRHJ FRjIocDsmLvQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638238" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638238" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:15 -0800 IronPort-SDR: vhTz0YvzWnZiWNuupDZkU8emnOjqFn/9sz6A6c/IUzqypF6MYg1vQuS1pVyqioYUlDBGAyNzuJ YjBoW4cW6RHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687522" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Kaixu Xia , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Tosk Robot Subject: [PATCH net-next 14/15] e1000e: remove the redundant value assignment in e1000_update_nvm_checksum_spt Date: Wed, 3 Feb 2021 16:42:58 -0800 Message-Id: <20210204004259.3662059-15-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Kaixu Xia Both of the statements are value assignment of the variable act_offset. The first value assignment is overwritten by the second and is useless. Remove it. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000e/ich8lan.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 6fb46682b058..0ac8d79a7987 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -3886,13 +3886,6 @@ static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw) if (ret_val) goto release; - /* And invalidate the previously valid segment by setting - * its signature word (0x13) high_byte to 0b. This can be - * done without an erase because flash erase sets all bits - * to 1's. We can write 1's to 0's without an erase - */ - act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1; - /* offset in words but we read dword */ act_offset = old_bank_offset + E1000_ICH_NVM_SIG_WORD - 1; ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset, &dword); From patchwork Thu Feb 4 00:42:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065913 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A744C433DB for ; Thu, 4 Feb 2021 00:48:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C48FF64E0F for ; Thu, 4 Feb 2021 00:48:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234561AbhBDAr6 (ORCPT ); Wed, 3 Feb 2021 19:47:58 -0500 Received: from mga11.intel.com ([192.55.52.93]:40083 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234583AbhBDApc (ORCPT ); Wed, 3 Feb 2021 19:45:32 -0500 IronPort-SDR: Lb/ZATXfvqB/eRUT1ADKxIdizieBDYmFrj7G8+Bv107EXA8JBtXFQ5c3rvE67QylTdQwG/J2Ka zLg5xMfoSYjg== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638240" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638240" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:15 -0800 IronPort-SDR: ++4gPz5MFHLEvLvMZH6r2ydQlYIxTFYcOQLDETM31w0W/cHu/+AEGvkDVGOey71rYQmWhm7Wb1 gzv2bCLxKpew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687525" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:15 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sudip Mukherjee , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Lukas Bulwahn Subject: [PATCH net-next 15/15] e1000: drop unneeded assignment in e1000_set_itr() Date: Wed, 3 Feb 2021 16:42:59 -0800 Message-Id: <20210204004259.3662059-16-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sudip Mukherjee The variable 'current_itr' is assigned to 0 before jumping to 'set_itr_now' but it has not been used after the jump. So, remove the unneeded assignment. Signed-off-by: Sudip Mukherjee Reviewed-by: Lukas Bulwahn Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000/e1000_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 5e28cf4fa2cd..042de276e632 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -2632,7 +2632,6 @@ static void e1000_set_itr(struct e1000_adapter *adapter) /* for non-gigabit speeds, just fix the interrupt rate at 4000 */ if (unlikely(adapter->link_speed != SPEED_1000)) { - current_itr = 0; new_itr = 4000; goto set_itr_now; }