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 1AF354404F; Wed, 12 Jun 2024 17:12:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11BC242DD3; Wed, 12 Jun 2024 17:04:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 1721042D8C for ; Wed, 12 Jun 2024 17:04:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204677; x=1749740677; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7goj4qpzPzdMV1eFye9x6Yln1OTUl8preOhklpjks50=; b=V2NX0w0cK1HCR4PDOpyIamx7EjXbZanHh/SsOBCb+t7gH8pyWnkYcVOy X1VA/8sB/jm+AdsY8pT/qdSxeFUnlx6vvZg2qIWNH7Xk2hsOgTyC0WfuU dbLEQ87SmZbzVrsFJaiIizASGgmw6ONNK7/WxFnPccZWm5IqzBOV2S4l4 RQ+ateQWRcAWL8CnIfGYpno7xQ5s/8Zsi7Tb4v9KvXrpDG+Cq7Ea56LOw Hbb/YFv+cqpYBKqP/08/qOOwl+DGJxS+HdpKtlfaXyCSVdJEP/GMoucI2 +LwRLiIL6HdUP1n+GZbqrZsQ+ayG1O+pyGrv9RB3svAQx8V4oJKBnWxHO w==; X-CSE-ConnectionGUID: Pu2nodYeQbqCx4oMrx0AIA== X-CSE-MsgGUID: gK9584BHSrOVNqqIzO3sWA== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459506" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459506" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:04:36 -0700 X-CSE-ConnectionGUID: B1sB1QJ4Tp221Is8HWwC/w== X-CSE-MsgGUID: zcsHT/OcRBSsdXXanxKm0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925257" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:04:35 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Eric Joyner Subject: [PATCH v2 049/148] net/ice/base: adapt No FEC in Auto support check to add E82X devices Date: Wed, 12 Jun 2024 16:00:43 +0100 Message-ID: <5f635e0ae7e4e3917c9be34bf2610b22824e25bc.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> 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: Ian Stokes 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 62c68b6d73..d4b9d793ba 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -5965,8 +5965,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; @@ -6180,11 +6178,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 79a6c1aa0f..879624fc6f 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -1656,11 +1656,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