From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06537A00BE; Fri, 12 Jun 2020 05:46:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B7A8C1B952; Fri, 12 Jun 2020 05:46:14 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4E27058C4 for ; Fri, 12 Jun 2020 05:46:09 +0200 (CEST) IronPort-SDR: iNuQIdc2kglOx/n9ekIXyDLROn8niAOJGa3NKG9dc7XfJB9Dw3975DCyB/z1/TQVGkwBSGlOif 5cAQ/FsNdKIQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 20:46:09 -0700 IronPort-SDR: LG6eAzF9XLfVgab/zlheeIQT/o0lJi2ix7KmuJGP7ONAEFnbr4j7s19uK1je6XoZlOQ3wiR/sj S3gwv4DdIFrw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,501,1583222400"; d="scan'208";a="289759473" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 20:46:07 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Guinan Sun , Mateusz Kowalski Date: Fri, 12 Jun 2020 03:23:52 +0000 Message-Id: <20200612032410.20864-4-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200612032410.20864-1-guinanx.sun@intel.com> References: <20200612032410.20864-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 03/21] net/ixgbe/base: hange flow for "Apply Update" command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For the "Apply Update" command the firmware does not given an response. For this command, success should be return. Based on information at EAS. Signed-off-by: Mateusz Kowalski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_common.c | 9 ++++++++- drivers/net/ixgbe/base/ixgbe_type.h | 12 ++++++++++++ 2 files changed, 20 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; } diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index 0470b1dfc..33ca659cd 100644 --- a/drivers/net/ixgbe/base/ixgbe_type.h +++ b/drivers/net/ixgbe/base/ixgbe_type.h @@ -4366,4 +4366,16 @@ struct ixgbe_hw { #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31 +#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x000000FF + #endif /* _IXGBE_TYPE_H_ */ -- 2.17.1