From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B499BA0471 for ; Wed, 19 Jun 2019 17:40:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 346411C517; Wed, 19 Jun 2019 17:21:06 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 394AD1C468 for ; Wed, 19 Jun 2019 17:20:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 08:20:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,392,1557212400"; d="scan'208";a="165050304" Received: from lrong-srv-03.sh.intel.com ([10.67.119.177]) by orsmga006.jf.intel.com with ESMTP; 19 Jun 2019 08:20:39 -0700 From: Leyi Rong To: qi.z.zhang@intel.com Cc: dev@dpdk.org, Leyi Rong , Marta Plantykow , Paul M Stillwell Jr Date: Wed, 19 Jun 2019 23:17:58 +0800 Message-Id: <20190619151846.113820-22-leyi.rong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190619151846.113820-1-leyi.rong@intel.com> References: <20190611155221.2703-1-leyi.rong@intel.com> <20190619151846.113820-1-leyi.rong@intel.com> Subject: [dpdk-dev] [PATCH v3 21/69] net/ice/base: add and fix debuglogs 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" Adding missing debuglogs and fixing existing debuglogs. Signed-off-by: Marta Plantykow Signed-off-by: Paul M Stillwell Jr Signed-off-by: Leyi Rong --- drivers/net/ice/base/ice_common.c | 16 ++++++++-------- drivers/net/ice/base/ice_controlq.c | 19 +++++++++++++++++++ drivers/net/ice/base/ice_flex_pipe.c | 7 ++++++- drivers/net/ice/base/ice_nvm.c | 14 +++++++------- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index 5b4a13a41..0083970a5 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -833,7 +833,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw) u16 mac_buf_len; void *mac_buf; - ice_debug(hw, ICE_DBG_TRACE, "ice_init_hw"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); /* Set MAC type based on DeviceID */ @@ -1623,7 +1623,7 @@ ice_aq_req_res(struct ice_hw *hw, enum ice_aq_res_ids res, struct ice_aq_desc desc; enum ice_status status; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_req_res"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd_resp = &desc.params.res_owner; @@ -1692,7 +1692,7 @@ ice_aq_release_res(struct ice_hw *hw, enum ice_aq_res_ids res, u8 sdp_number, struct ice_aqc_req_res *cmd; struct ice_aq_desc desc; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_release_res"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd = &desc.params.res_owner; @@ -1722,7 +1722,7 @@ ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res, u32 time_left = timeout; enum ice_status status; - ice_debug(hw, ICE_DBG_TRACE, "ice_acquire_res"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); status = ice_aq_req_res(hw, res, access, 0, &time_left, NULL); @@ -1780,7 +1780,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res) enum ice_status status; u32 total_delay = 0; - ice_debug(hw, ICE_DBG_TRACE, "ice_release_res"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); status = ice_aq_release_res(hw, res, 0, NULL); @@ -1814,7 +1814,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries, struct ice_aqc_alloc_free_res_cmd *cmd; struct ice_aq_desc desc; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_alloc_free_res"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd = &desc.params.sw_res_ctrl; @@ -3106,7 +3106,7 @@ ice_aq_add_lan_txq(struct ice_hw *hw, u8 num_qgrps, struct ice_aqc_add_txqs *cmd; struct ice_aq_desc desc; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_add_lan_txq"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd = &desc.params.add_txqs; @@ -3162,7 +3162,7 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps, enum ice_status status; u16 i, sz = 0; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_dis_lan_txq"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd = &desc.params.dis_txqs; ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_dis_txqs); diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c index 6d893e2f2..4cb6df113 100644 --- a/drivers/net/ice/base/ice_controlq.c +++ b/drivers/net/ice/base/ice_controlq.c @@ -35,6 +35,8 @@ static void ice_adminq_init_regs(struct ice_hw *hw) { struct ice_ctl_q_info *cq = &hw->adminq; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + ICE_CQ_INIT_REGS(cq, PF_FW); } @@ -295,6 +297,8 @@ static enum ice_status ice_init_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq) { enum ice_status ret_code; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + if (cq->sq.count > 0) { /* queue already initialized */ ret_code = ICE_ERR_NOT_READY; @@ -354,6 +358,8 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq) { enum ice_status ret_code; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + if (cq->rq.count > 0) { /* queue already initialized */ ret_code = ICE_ERR_NOT_READY; @@ -422,6 +428,8 @@ ice_shutdown_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq) { enum ice_status ret_code = ICE_SUCCESS; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + ice_acquire_lock(&cq->sq_lock); if (!cq->sq.count) { @@ -485,6 +493,8 @@ ice_shutdown_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq) { enum ice_status ret_code = ICE_SUCCESS; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + ice_acquire_lock(&cq->rq_lock); if (!cq->rq.count) { @@ -521,6 +531,8 @@ static enum ice_status ice_init_check_adminq(struct ice_hw *hw) struct ice_ctl_q_info *cq = &hw->adminq; enum ice_status status; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + status = ice_aq_get_fw_ver(hw, NULL); if (status) @@ -559,6 +571,8 @@ static enum ice_status ice_init_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type) struct ice_ctl_q_info *cq; enum ice_status ret_code; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + switch (q_type) { case ICE_CTL_Q_ADMIN: ice_adminq_init_regs(hw); @@ -617,6 +631,8 @@ enum ice_status ice_init_all_ctrlq(struct ice_hw *hw) { enum ice_status ret_code; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + /* Init FW admin queue */ ret_code = ice_init_ctrlq(hw, ICE_CTL_Q_ADMIN); @@ -677,6 +693,8 @@ static void ice_shutdown_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type) { struct ice_ctl_q_info *cq; + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); + switch (q_type) { case ICE_CTL_Q_ADMIN: cq = &hw->adminq; @@ -704,6 +722,7 @@ static void ice_shutdown_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type) */ void ice_shutdown_all_ctrlq(struct ice_hw *hw) { + ice_debug(hw, ICE_DBG_TRACE, "ice_shutdown_all_ctrlq\n"); /* Shutdown FW admin queue */ ice_shutdown_ctrlq(hw, ICE_CTL_Q_ADMIN); /* Shutdown PF-VF Mailbox */ diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c index fb20493ca..e3de71363 100644 --- a/drivers/net/ice/base/ice_flex_pipe.c +++ b/drivers/net/ice/base/ice_flex_pipe.c @@ -1142,7 +1142,7 @@ ice_get_pkg_info(struct ice_hw *hw) u16 size; u32 i; - ice_debug(hw, ICE_DBG_TRACE, "ice_init_pkg_info\n"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); size = sizeof(*pkg_info) + (sizeof(pkg_info->pkg_info[0]) * (ICE_PKG_CNT - 1)); @@ -2417,6 +2417,11 @@ ice_vsig_free(struct ice_hw *hw, enum ice_block blk, u16 vsig) ice_free(hw, del); } + /* if VSIG characteristic list was cleared for reset + * re-initialize the list head + */ + INIT_LIST_HEAD(&hw->blk[blk].xlt2.vsig_tbl[idx].prop_lst); + return ICE_SUCCESS; } diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c index b770abfd0..fa9c348ce 100644 --- a/drivers/net/ice/base/ice_nvm.c +++ b/drivers/net/ice/base/ice_nvm.c @@ -24,7 +24,7 @@ ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, struct ice_aq_desc desc; struct ice_aqc_nvm *cmd; - ice_debug(hw, ICE_DBG_TRACE, "ice_aq_read_nvm"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); cmd = &desc.params.nvm; @@ -95,7 +95,7 @@ ice_read_sr_aq(struct ice_hw *hw, u32 offset, u16 words, u16 *data, { enum ice_status status; - ice_debug(hw, ICE_DBG_TRACE, "ice_read_sr_aq"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); status = ice_check_sr_access_params(hw, offset, words); @@ -123,7 +123,7 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data) { enum ice_status status; - ice_debug(hw, ICE_DBG_TRACE, "ice_read_sr_word_aq"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); status = ice_read_sr_aq(hw, offset, 1, data, true); if (!status) @@ -152,7 +152,7 @@ ice_read_sr_buf_aq(struct ice_hw *hw, u16 offset, u16 *words, u16 *data) u16 words_read = 0; u16 i = 0; - ice_debug(hw, ICE_DBG_TRACE, "ice_read_sr_buf_aq"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); do { u16 read_size, off_w; @@ -202,7 +202,7 @@ ice_read_sr_buf_aq(struct ice_hw *hw, u16 offset, u16 *words, u16 *data) static enum ice_status ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access) { - ice_debug(hw, ICE_DBG_TRACE, "ice_acquire_nvm"); + ice_debug(hw, ICE_DBG_TRACE, "ice_acquire_nvm\n"); if (hw->nvm.blank_nvm_mode) return ICE_SUCCESS; @@ -218,7 +218,7 @@ ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access) */ static void ice_release_nvm(struct ice_hw *hw) { - ice_debug(hw, ICE_DBG_TRACE, "ice_release_nvm"); + ice_debug(hw, ICE_DBG_TRACE, "ice_release_nvm\n"); if (hw->nvm.blank_nvm_mode) return; @@ -263,7 +263,7 @@ enum ice_status ice_init_nvm(struct ice_hw *hw) u32 fla, gens_stat; u8 sr_size; - ice_debug(hw, ICE_DBG_TRACE, "ice_init_nvm"); + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); /* The SR size is stored regardless of the NVM programming mode * as the blank mode may be used in the factory line. -- 2.17.1