net/ice/base: add and fix debug logs

Adding missing debug logs and fixing existing debug logs.

Signed-off-by: Marta Plantykow <marta.a.plantykow@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Leyi Rong 2019-06-19 23:17:58 +08:00 committed by Ferruh Yigit
parent 39e30e38c4
commit bd91c68f05
4 changed files with 40 additions and 16 deletions

@ -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);

@ -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 */

@ -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;
}

@ -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 @@ read_nvm_buf_aq_exit:
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.