From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0894DC3FA for ; Mon, 20 Apr 2015 10:23:06 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 20 Apr 2015 01:23:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,608,1422950400"; d="scan'208";a="697841065" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2015 01:23:05 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t3K8N3ww013141; Mon, 20 Apr 2015 16:23:03 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t3K8N0J7028224; Mon, 20 Apr 2015 16:23:02 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t3K8N0sn028220; Mon, 20 Apr 2015 16:23:00 +0800 From: Helin Zhang To: dev@dpdk.org Date: Mon, 20 Apr 2015 16:22:25 +0800 Message-Id: <1429518150-28098-14-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1429518150-28098-1-git-send-email-helin.zhang@intel.com> References: <1429518150-28098-1-git-send-email-helin.zhang@intel.com> Cc: monica.kenguva@intel.com, steven.j.murray@intel.com, chiu-pi.shih@intel.com Subject: [dpdk-dev] [PATCH 13/18] i40e: replacement of 'i40e_debug_read_register()' X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 08:23:07 -0000 As base driver provides 'i40e_aq_debug_read_register()', the same functional interface of 'i40e_debug_read_register()' can be replaced. Signed-off-by: Helin Zhang --- lib/librte_pmd_i40e/i40e_ethdev.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 8832609..5bc2504 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -5623,25 +5623,6 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype) return flowtype_table[pctype]; } -static int -i40e_debug_read_register(struct i40e_hw *hw, uint32_t addr, uint64_t *val) -{ - struct i40e_aq_desc desc; - enum i40e_status_code status; - - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_debug_read_reg); - desc.params.internal.param1 = rte_cpu_to_le_32(addr); - status = i40e_asq_send_command(hw, &desc, NULL, 0, NULL); - if (status < 0) - return status; - - *val = ((uint64_t)(rte_le_to_cpu_32(desc.params.internal.param2)) << - (CHAR_BIT * sizeof(uint32_t))) + - rte_le_to_cpu_32(desc.params.internal.param3); - - return status; -} - /* * On X710, performance number is far from the expectation on recent firmware * versions; on XL710, performance number is also far from the expectation on @@ -5692,7 +5673,8 @@ i40e_configure_registers(struct i40e_hw *hw) I40E_GL_SWR_PM_UP_THR_EF_VALUE; } - ret = i40e_debug_read_register(hw, reg_table[i].addr, ®); + ret = i40e_aq_debug_read_register(hw, reg_table[i].addr, + ®, NULL); if (ret < 0) { PMD_DRV_LOG(ERR, "Failed to read from 0x%"PRIx32, reg_table[i].addr); -- 1.8.1.4