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 E02CE4404F; Wed, 12 Jun 2024 17:08:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C86FA4275B; Wed, 12 Jun 2024 17:03:54 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 38C6641611 for ; Wed, 12 Jun 2024 17:03:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204631; x=1749740631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/LAaP7vZHfy69e+EdW24Nz0xvzgFBNBZ7YnR4RYFF+M=; b=I5VJUiH0cb+mTuDCTQMhHlHLFU6MXUKN4SthWVjqTbemt9DhyuSCZlg9 9mVD/wlTxjid0UZLk2dMLJ79Vq74VI1ngaAmT1xTBLk6+d7S9wIcFjkAC dNAxalYY6ePDIQUlj6cqSCnwJmU5A3Ln1QvXqtVpoTYwF7Pnci92Vj1H2 bbbVt70UBUCzSjkDEH5D6lUNMpH6rAvqJGIcm5zetvSm+sOpaV1fxuCTv nHQ56F5o9Wx7sOHGv8ZJwbtCYC4fhujXanwUlc5E4mSIYUv4bjg1Xo/Ml Y5czmqhKWt/EDuTOxhz5crJHiLQWcjJEr89n1+zG4BemDLtgbAxj57PGV g==; X-CSE-ConnectionGUID: wK1LWMV4RL2QWiIC5KgFJA== X-CSE-MsgGUID: M1Hk4nH/QzKnDVcNPIk1QQ== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459223" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459223" 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:03:51 -0700 X-CSE-ConnectionGUID: vtX17YJFT2yjpfX+zYfSAg== X-CSE-MsgGUID: IInTbazARAKirH03kyuJ2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39924957" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:03:50 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Fabio Pricoco Subject: [PATCH v2 021/148] net/ice/base: code adjustments for E830 Date: Wed, 12 Jun 2024 16:00:15 +0100 Message-ID: <6a62675f75671dded12a90e8fb73b795bb88ea3f.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 Adjustments required for E830 code base where other platforms may need to be recognised. Changes are included here to reduced diff between here and upstream. Also include minor comment adjustment. Signed-off-by: Fabio Pricoco Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_common.c | 10 ++++++---- drivers/net/ice/base/ice_switch.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index ca9a6baef7..4a2421a896 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -1209,7 +1209,7 @@ int ice_check_reset(struct ice_hw *hw) */ static int ice_pf_reset(struct ice_hw *hw) { - u32 cnt, reg; + u32 cnt, reg, reset_wait_cnt, cfg_lock_timeout; /* If at function entry a global reset was already in progress, i.e. * state is not 'device active' or any of the reset done bits are not @@ -1234,8 +1234,10 @@ static int ice_pf_reset(struct ice_hw *hw) * timeout plus the PFR timeout which will account for a possible reset * that is occurring during a download package operation. */ - for (cnt = 0; cnt < ICE_GLOBAL_CFG_LOCK_TIMEOUT + - ICE_PF_RESET_WAIT_COUNT; cnt++) { + reset_wait_cnt = ICE_PF_RESET_WAIT_COUNT; + cfg_lock_timeout = ICE_GLOBAL_CFG_LOCK_TIMEOUT; + + for (cnt = 0; cnt < cfg_lock_timeout + reset_wait_cnt; cnt++) { reg = rd32(hw, PFGEN_CTRL); if (!(reg & PFGEN_CTRL_PFSWR_M)) break; @@ -1243,7 +1245,7 @@ static int ice_pf_reset(struct ice_hw *hw) ice_msec_delay(1, true); } - if (cnt == ICE_PF_RESET_WAIT_COUNT) { + if (cnt == cfg_lock_timeout + reset_wait_cnt) { ice_debug(hw, ICE_DBG_INIT, "PF reset polling failed to complete.\n"); return ICE_ERR_RESET_FAILED; } diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 73b4a8675e..448ec26fe2 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -9483,7 +9483,7 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups, goto err_ice_add_adv_rule; } - /* set the rule LOOKUP type based on caller specified 'Rx' + /* Set the rule LOOKUP type based on caller specified 'Rx' * instead of hardcoding it to be either LOOKUP_TX/RX * * for 'Rx' set the source to be the port number -- 2.43.0