From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 9286BA0523;
	Thu,  2 Jul 2020 05:31:11 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 390431D5F4;
	Thu,  2 Jul 2020 05:30:46 +0200 (CEST)
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id 8841E1D5E9
 for <dev@dpdk.org>; Thu,  2 Jul 2020 05:30:44 +0200 (CEST)
IronPort-SDR: WjAKMP2Qktt9R3RQIzEiX9ZhkDdxy8JX8J1Z4aHBwgQj0CpX2WAnaY4WNSFkSUip6TIBJxlEMC
 ibpuru3taavg==
X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="144300612"
X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="144300612"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 01 Jul 2020 20:30:44 -0700
IronPort-SDR: s1pGkuFx5aqkfH8BNUgwyFmVr3w7+QMWxGMSm1y13o+42FjS96xXevn+35ZVOM6CjfUaU23yrI
 DV8fSDRSKitQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="295751509"
Received: from intel.sh.intel.com ([10.239.255.18])
 by orsmga002.jf.intel.com with ESMTP; 01 Jul 2020 20:30:42 -0700
From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Jeff Guo <jia.guo@intel.com>, Zhao1 Wei <wei.zhao1@intel.com>,
 Guinan Sun <guinanx.sun@intel.com>,
 Mateusz Kowalski <mateusz.kowalski@intel.com>
Date: Thu,  2 Jul 2020 03:13:13 +0000
Message-Id: <20200702031329.4495-5-guinanx.sun@intel.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20200702031329.4495-1-guinanx.sun@intel.com>
References: <20200612032410.20864-1-guinanx.sun@intel.com>
 <20200702031329.4495-1-guinanx.sun@intel.com>
Subject: [dpdk-dev] [PATCH v2 04/20] net/ixgbe/base: change flow for "Apply
	Update" command
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

For the "Apply Update" command the firmware does not
given an response. For this command, success should
be return.

Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 9e3b71e38..89ae2b462 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4584,11 +4584,18 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,
 		msec_delay(1);
 	}
 
+	/* For each command except "Apply Update" perform
+	 * status checks in the HICR registry.
+	 */
+	if ((buffer[0] & IXGBE_HOST_INTERFACE_MASK_CMD) ==
+	    IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD)
+		return IXGBE_SUCCESS;
+
 	/* Check command completion */
 	if ((timeout && i == timeout) ||
 	    !(IXGBE_READ_REG(hw, IXGBE_HICR) & IXGBE_HICR_SV)) {
 		ERROR_REPORT1(IXGBE_ERROR_CAUTION,
-			     "Command has failed with no status valid.\n");
+			      "Command has failed with no status valid.\n");
 		return IXGBE_ERR_HOST_INTERFACE_COMMAND;
 	}
 
-- 
2.17.1