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 CA374A054A; Wed, 7 Sep 2022 11:21:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CB6C427EA; Wed, 7 Sep 2022 11:21:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id E326B40042 for ; Wed, 7 Sep 2022 11:20:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662542460; x=1694078460; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Du/svdv1kj0yS+8ZIGFhp4Ss5dFNNzq1cIPQaAOFB+o=; b=gkRZVO7p8/8CY1e8b7lxx78kYPseAZe098ElVdrQauSpKUA5lmr4asY1 P+SPabSM6EE7C61wBnYAkj8Y7zAiHWqKDCEP/LxWV7ZP8wolXEhK+vYpy 6y4nLo8yKCSZvxZ230Kz+B8wDiX63W9+kxitLKHVUWJIIK9FaohwVaO7E GKaPjUzu5lbGN/an/RU5vS6we1wOy0g5LPAfA76S5qaicct2lnl6rsyBP 2PbRG2XLWevsfRUzuMCdX073MIYBJBEg9g9KF3ghcYvWc5VGSCiOM/GjG IwEc0GxnIiWoZMUkgTuw76nkM5bVbskcCH60x0CVDzRqgg+I5Ue0LFMDv w==; X-IronPort-AV: E=McAfee;i="6500,9779,10462"; a="294409089" X-IronPort-AV: E=Sophos;i="5.93,296,1654585200"; d="scan'208";a="294409089" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 02:20:59 -0700 X-IronPort-AV: E=Sophos;i="5.93,296,1654585200"; d="scan'208";a="591615351" Received: from intel-cd-odc-steve.cd.intel.com ([10.240.178.189]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 02:20:57 -0700 From: Steve Yang To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, Steve Yang Subject: [PATCH v1] net/ice/base: fix ddp pkg loaded failed Date: Wed, 7 Sep 2022 09:10:01 +0000 Message-Id: <20220907091001.68216-1-stevex.yang@intel.com> X-Mailer: git-send-email 2.25.1 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 When DDP package state is 'ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED', it should be treated as success state, otherwise, the wrong state will be used within 'ice_load_pkg'. Fixes: 58e9fd55be0e ("net/ice/base: refactor DDP code") Signed-off-by: Steve Yang --- drivers/net/ice/base/ice_ddp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index d1cae48047..284b58a6b1 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -1378,8 +1378,11 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len) */ if (!state || state == ICE_DDP_PKG_ALREADY_LOADED) { state = ice_get_pkg_info(hw); - if (!state) + if (!state) { state = ice_get_ddp_pkg_state(hw, already_loaded); + if (state == ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED) + state = ICE_SUCCESS; + } } if (ice_is_init_pkg_successful(state)) { -- 2.25.1