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 64E06A0567 for ; Wed, 10 Mar 2021 10:19:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 584CF40687; Wed, 10 Mar 2021 10:19:16 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 881EB40687 for ; Wed, 10 Mar 2021 10:19:14 +0100 (CET) IronPort-SDR: U5XLrWmbQc5Mn/Zv/BREU9IbbHQJx/Z2uWkpPJ+BLaJSC1NpSy7fR++pyz7/n5ur5lMCuRJkso UnBnEkwELEqg== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="273462640" X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="273462640" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 01:19:13 -0800 IronPort-SDR: fniIc1YBTHWnpkBygtnSF499tYp2Dvn0oh6T53ZvYJ6m2wNAZQdgtvr/QgYfkqwu6uhm8gqiaM Mba9kz3jsfQA== X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="603008271" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 01:19:11 -0800 From: Murphy Yang To: stable@dpdk.org Cc: Murphy Yang , Paul M Stillwell Jr , Qi Zhang Date: Wed, 10 Mar 2021 09:12:32 +0000 Message-Id: <20210310091232.86157-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [PATCH 19.11] net/ice/baes: add NVM help functions X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" [ upstream commit f82d2874f8b1b6db694c644fa013a36a1be110c2 ] Add couple functions that DPDK would like to use for accessing the NVM. Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_common.h | 1 - drivers/net/ice/base/ice_nvm.c | 6 +++--- drivers/net/ice/base/ice_nvm.h | 8 ++++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h index 63b733d74f..8fca328768 100644 --- a/drivers/net/ice/base/ice_common.h +++ b/drivers/net/ice/base/ice_common.h @@ -18,7 +18,6 @@ enum ice_fw_modes { ICE_FW_MODE_ROLLBACK }; -enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); enum ice_status ice_init_hw(struct ice_hw *hw); void ice_deinit_hw(struct ice_hw *hw); diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c index c5dc6049d9..64fb92b8a5 100644 --- a/drivers/net/ice/base/ice_nvm.c +++ b/drivers/net/ice/base/ice_nvm.c @@ -17,7 +17,7 @@ * * Read the NVM using the admin queue commands (0x0701) */ -static enum ice_status +enum ice_status ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, void *data, bool last_command, bool read_shadow_ram, struct ice_sq_cd *cd) @@ -245,7 +245,7 @@ ice_read_sr_buf_aq(struct ice_hw *hw, u16 offset, u16 *words, u16 *data) * * This function will request NVM ownership. */ -static enum ice_status +enum ice_status ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access) { ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); @@ -262,7 +262,7 @@ ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access) * * This function will release NVM ownership. */ -static void ice_release_nvm(struct ice_hw *hw) +void ice_release_nvm(struct ice_hw *hw) { ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); diff --git a/drivers/net/ice/base/ice_nvm.h b/drivers/net/ice/base/ice_nvm.h index 592ae03c33..a138768ad8 100644 --- a/drivers/net/ice/base/ice_nvm.h +++ b/drivers/net/ice/base/ice_nvm.h @@ -85,10 +85,18 @@ enum ice_status ice_handle_nvm_access(struct ice_hw *hw, struct ice_nvm_access_cmd *cmd, union ice_nvm_access_data *data); enum ice_status +ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access); +void ice_release_nvm(struct ice_hw *hw); +enum ice_status +ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, + void *data, bool last_command, bool read_shadow_ram, + struct ice_sq_cd *cd); +enum ice_status ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, bool read_shadow_ram); enum ice_status ice_init_nvm(struct ice_hw *hw); enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); enum ice_status ice_read_sr_buf(struct ice_hw *hw, u16 offset, u16 *words, u16 *data); +enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); #endif /* _ICE_NVM_H_ */ -- 2.17.1