From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 634ED45500; Wed, 26 Jun 2024 13:56:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B34BD43314; Wed, 26 Jun 2024 13:55:15 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id D53B542E95 for ; Wed, 26 Jun 2024 13:43:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402212; x=1750938212; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kE9hbgZTbWboh+jQPXkhFNRPXHzucP7OBjHJWF3VyTk=; b=nPhYES3/CZzuIoyt0vUTtaqYw7g6XqgcVGOIJejhAHkVB2EqzUFagmFg o/uPOqH3rv4GUO5YQnOjGGYRKd/SaFgR5LzupobNw8DXacFeNIxHRtiXk GvDfaZfP4/i85nvlq1bDyRrC8nxJUAxA6OgVpQPpeJ2Sr+3zI3aQFoM7v Zb9oUXoR2dV1HndQnlw/uIy+rGWPylok1vYhUEFP6V3UtHt1SRjZjX2PM NAwGy31VSpuVrTZkx+bibpioK1d2UQQm7k3WhK2If4cHbsr4FzQsqbl18 /foGmKB59YKSe2U3uuAlMktljaHikT3nurUNFiwHTfJRhaluDAvY2ahJY g==; X-CSE-ConnectionGUID: cDh42hI6QmWFPQprUN9XMg== X-CSE-MsgGUID: XDhbMvBkT/m3e/FOd2ChNw== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979330" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979330" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:43:31 -0700 X-CSE-ConnectionGUID: T5sRtZGMQdiaVEpYpv0rSw== X-CSE-MsgGUID: jJHZSmFWQomaCWrKd+UUhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873543" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:43:30 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Eric Joyner , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 019/103] net/ice/base: adapt No FEC in Auto support check to add E82X devices Date: Wed, 26 Jun 2024 12:41:07 +0100 Message-ID: <2d0d43e13c93e393c5e0a72e10cfcbce6d0e91f9.1719401847.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Eric Joyner Previously, the "No FEC in Auto mode" feature was added to the link management engine (part of firmware) for E810 devices, and was unsupported at the time on E82X devices. However, this support is now being extended to new FW versions for E82X devices, and so the SW check to enable this mode must be changed to allow E82X devices as well. Importantly, to support this, modify the existing the ice_is_fw_min_ver() function to no longer check FW Major/Minor/Patch versions across branches, since features land in the E810 and E82X branches in different versions. Then, the check in ice_fw_supports_fec_dis_auto() can check the supported versions in each branch separately. ice_is_fw_min_ver() is only used in this function, so there's no behavior change needed elsewhere. Signed-off-by: Eric Joyner Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 11 +++++++---- drivers/net/ice/base/ice_type.h | 7 +++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 61cf6da3ad..5a34a0e86e 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -5951,8 +5951,6 @@ static bool ice_is_fw_min_ver(struct ice_hw *hw, u8 branch, u8 maj, u8 min, if (hw->fw_min_ver == min && hw->fw_patch >= patch) return true; } - } else if (hw->fw_branch > branch) { - return true; } return false; @@ -6166,11 +6164,16 @@ bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw) */ bool ice_fw_supports_fec_dis_auto(struct ice_hw *hw) { - return ice_is_fw_min_ver(hw, ICE_FW_FEC_DIS_AUTO_BRANCH, + return ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E810, ICE_FW_FEC_DIS_AUTO_MAJ, ICE_FW_FEC_DIS_AUTO_MIN, - ICE_FW_FEC_DIS_AUTO_PATCH); + ICE_FW_FEC_DIS_AUTO_PATCH) || + ice_is_fw_min_ver(hw, ICE_FW_VER_BRANCH_E82X, + ICE_FW_FEC_DIS_AUTO_MAJ_E82X, + ICE_FW_FEC_DIS_AUTO_MIN_E82X, + ICE_FW_FEC_DIS_AUTO_PATCH_E82X); } + /** * ice_is_fw_auto_drop_supported * @hw: pointer to the hardware structure diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index 99eb758eeb..d5f17081af 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1653,11 +1653,18 @@ struct ice_aq_get_set_rss_lut_params { #define ICE_FW_API_REPORT_DFLT_CFG_PATCH 3 +/* FW branch number for hardware families */ +#define ICE_FW_VER_BRANCH_E82X 0 +#define ICE_FW_VER_BRANCH_E810 1 + /* FW version for FEC disable in Auto FEC mode */ #define ICE_FW_FEC_DIS_AUTO_BRANCH 1 #define ICE_FW_FEC_DIS_AUTO_MAJ 7 #define ICE_FW_FEC_DIS_AUTO_MIN 0 #define ICE_FW_FEC_DIS_AUTO_PATCH 5 +#define ICE_FW_FEC_DIS_AUTO_MAJ_E82X 7 +#define ICE_FW_FEC_DIS_AUTO_MIN_E82X 1 +#define ICE_FW_FEC_DIS_AUTO_PATCH_E82X 2 /* AQ API version for FW auto drop reports */ #define ICE_FW_API_AUTO_DROP_MAJ 1 -- 2.43.0