From patchwork Fri Jan 8 04:35:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 86151 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 mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27054A0524; Fri, 8 Jan 2021 05:32:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD376140E01; Fri, 8 Jan 2021 05:31:28 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 1C42F140DF8 for ; Fri, 8 Jan 2021 05:31:26 +0100 (CET) IronPort-SDR: g15huDcSynS51SZG3r1//1RzHB4VrxOLa37jpQLC8ywjtXhyVUqzGFWWdQIUtzYH+JTwLlQc/e xzCkg16n05iw== X-IronPort-AV: E=McAfee;i="6000,8403,9857"; a="262309387" X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="262309387" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 20:31:26 -0800 IronPort-SDR: tcGjHs//PUSKEi1bJQCaQMgUK+WVIYhExPEPvW9b1c/u78YlcACPzHc0qMyyOuDrypYqSwESdn n6e/lsyIwcvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,330,1602572400"; d="scan'208";a="398858728" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by fmsmga002.fm.intel.com with ESMTP; 07 Jan 2021 20:31:25 -0800 From: Qi Zhang To: qiming.yang@intel.com Cc: haiyue.wang@intel.com, jia.guo@intel.com, dev@dpdk.org, ferruh.yigit@intel.com, Qi Zhang , Jeb Cramer Date: Fri, 8 Jan 2021 12:35:04 +0800 Message-Id: <20210108043508.301227-6-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210108043508.301227-1-qi.z.zhang@intel.com> References: <20210108043508.301227-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 5/9] net/ice/base: limit forced overrides based on FW version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Beyond a specific version of firmware, there is no need to provide override values to the firmware when setting PHY capabilities. In this case, we do not need to indicate whether we're in Strict or Lenient Link Mode. In the case of translating capabilities to the configuration structure, the module compliance enforcement is already correctly set by firmware, so the extra code block is redundant. Signed-off-by: Jeb Cramer Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index f2fb132060..b71feb3476 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -3088,17 +3088,6 @@ ice_copy_phy_caps_to_cfg(struct ice_port_info *pi, cfg->link_fec_opt = caps->link_fec_options; cfg->module_compliance_enforcement = caps->module_compliance_enforcement; - - if (ice_fw_supports_link_override(pi->hw)) { - struct ice_link_default_override_tlv tlv; - - if (ice_get_link_default_override(&tlv, pi)) - return; - - if (tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE) - cfg->module_compliance_enforcement |= - ICE_LINK_OVERRIDE_STRICT_MODE; - } } /** @@ -3168,7 +3157,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg, break; } - if (fec == ICE_FEC_AUTO && ice_fw_supports_link_override(pi->hw)) { + if (fec == ICE_FEC_AUTO && ice_fw_supports_link_override(pi->hw) && + !ice_fw_supports_report_dflt_cfg(pi->hw)) { struct ice_link_default_override_tlv tlv; if (ice_get_link_default_override(&tlv, pi))