From patchwork Mon Jul 6 08:12:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 73184 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4606FA00C5; Mon, 6 Jul 2020 10:26:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5DF6E1D9A4; Mon, 6 Jul 2020 10:24:33 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 306321D9A4 for ; Mon, 6 Jul 2020 10:24:31 +0200 (CEST) IronPort-SDR: H21VyrieEGtQbGuUf7ixf6Ry3Knu2qi2fKDRtQMX8XC6UTepRUzMHlkuzMl3jI4RjGrfxjDzJM gxlJKkCQAAxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9673"; a="147379318" X-IronPort-AV: E=Sophos;i="5.75,318,1589266800"; d="scan'208";a="147379318" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 01:24:30 -0700 IronPort-SDR: /a9wdeLHSY2fwH7oC+OyCud94PVghKRh4x2xHYo2LvhaJ4c6lO+AjxTbr8+wFrMLK8Iw6hFNeQ zOA6AI+bqZEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,318,1589266800"; d="scan'208";a="388128961" Received: from intel.sh.intel.com ([10.239.255.48]) by fmsmga001.fm.intel.com with ESMTP; 06 Jul 2020 01:24:28 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun , Efrati Nir Date: Mon, 6 Jul 2020 08:12:14 +0000 Message-Id: <20200706081222.19279-20-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706081222.19279-1-guinanx.sun@intel.com> References: <20200622064634.70941-1-guinanx.sun@intel.com> <20200706081222.19279-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v3 19/27] net/e1000/base: modify flow control setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Customers had a problem with large pings after connected standby. This is due to the requirement of maintaining link after CS - the driver blocks resets during "AdapterStart" and skips flow control setup. Added condition in e1000_setup_link_ich8lan.c function that always setup flow control, and setup physical interface only when no need to block resets. Signed-off-by: Efrati Nir Signed-off-by: Guinan Sun --- drivers/net/e1000/base/e1000_ich8lan.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index 9b9cc7d90..85344ebeb 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -5200,9 +5200,6 @@ STATIC s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) DEBUGFUNC("e1000_setup_link_ich8lan"); - if (hw->phy.ops.check_reset_block(hw)) - return E1000_SUCCESS; - /* ICH parts do not have a word in the NVM to determine * the default flow control setting, so we explicitly * set it to full. @@ -5218,10 +5215,12 @@ STATIC s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) DEBUGOUT1("After fix-ups FlowControl is now = %x\n", hw->fc.current_mode); - /* Continue to configure the copper link. */ - ret_val = hw->mac.ops.setup_physical_interface(hw); - if (ret_val) - return ret_val; + if (!hw->phy.ops.check_reset_block(hw)) { + /* Continue to configure the copper link. */ + ret_val = hw->mac.ops.setup_physical_interface(hw); + if (ret_val) + return ret_val; + } E1000_WRITE_REG(hw, E1000_FCTTV, hw->fc.pause_time); if ((hw->phy.type == e1000_phy_82578) ||