src/dpdk/drivers/net/qede/qede_debug.c
static void qed_grc_clear_all_prty(struct ecore_hwfn *p_hwfn,
				   struct ecore_ptt *p_ptt)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	const struct dbg_attn_reg *attn_reg_arr;
	u8 reg_idx, num_attn_regs;
	u32 block_id;

	for (block_id = 0; block_id < NUM_PHYS_BLOCKS; block_id++) {
		if (dev_data->block_in_reset[block_id])
			continue;

		attn_reg_arr = qed_get_block_attn_regs(p_hwfn,
						       (enum block_id)block_id,
						       ATTN_TYPE_PARITY,
						       &num_attn_regs);

		for (reg_idx = 0; reg_idx < num_attn_regs; reg_idx++) {
			const struct dbg_attn_reg *reg_data =
				&attn_reg_arr[reg_idx];
			u16 modes_buf_offset;
			bool eval_mode;

			/* Check mode */
			eval_mode = GET_FIELD(reg_data->mode.data,
					      DBG_MODE_HDR_EVAL_MODE) > 0;
			modes_buf_offset =
				GET_FIELD(reg_data->mode.data,
					  DBG_MODE_HDR_MODES_BUF_OFFSET);

			/* If Mode match: clear parity status */
			if (!eval_mode ||
			    qed_is_mode_match(p_hwfn, &modes_buf_offset))
				ecore_rd(p_hwfn, p_ptt,
				    DWORDS_TO_BYTES(reg_data->sts_clr_address));
		}
	}
}
/* For each block, clear the status of all parities */
For each block, clear the status of all parities
For each block clear the status of all parities
static void qed_grc_clear_all_prty(struct ecore_hwfn *p_hwfn,
				   struct ecore_ptt *p_ptt)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	const struct dbg_attn_reg *attn_reg_arr;
	u8 reg_idx, num_attn_regs;
	u32 block_id;
	for (block_id = 0; block_id < NUM_PHYS_BLOCKS; block_id++) {
		if (dev_data->block_in_reset[block_id])
			continue;
		attn_reg_arr = qed_get_block_attn_regs(p_hwfn,
						       (enum block_id)block_id,
						       ATTN_TYPE_PARITY,
						       &num_attn_regs);
		for (reg_idx = 0; reg_idx < num_attn_regs; reg_idx++) {
			const struct dbg_attn_reg *reg_data =
				&attn_reg_arr[reg_idx];
			u16 modes_buf_offset;
			bool eval_mode;
			eval_mode = GET_FIELD(reg_data->mode.data,
					      DBG_MODE_HDR_EVAL_MODE) > 0;
			modes_buf_offset =
				GET_FIELD(reg_data->mode.data,
					  DBG_MODE_HDR_MODES_BUF_OFFSET);
			if (!eval_mode ||
			    qed_is_mode_match(p_hwfn, &modes_buf_offset))
				ecore_rd(p_hwfn, p_ptt,
				    DWORDS_TO_BYTES(reg_data->sts_clr_address));
		}
	}
}
static void qed_grc_clear_all_prty ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt ) { struct dbg_tools_data * dev_data = & p_hwfn -> dbg_info ; const struct dbg_attn_reg * attn_reg_arr ; u8 reg_idx , num_attn_regs ; u32 block_id ; for ( block_id = 0 ; block_id < NUM_PHYS_BLOCKS ; block_id ++ ) { if ( dev_data -> block_in_reset [ block_id ] ) continue ; attn_reg_arr = qed_get_block_attn_regs ( p_hwfn , ( enum block_id ) block_id , ATTN_TYPE_PARITY , & num_attn_regs ) ; for ( reg_idx = 0 ; reg_idx < num_attn_regs ; reg_idx ++ ) { const struct dbg_attn_reg * reg_data = & attn_reg_arr [ reg_idx ] ; u16 modes_buf_offset ; bool eval_mode ; eval_mode = GET_FIELD ( reg_data -> mode . data , DBG_MODE_HDR_EVAL_MODE ) > 0 ; modes_buf_offset = GET_FIELD ( reg_data -> mode . data , DBG_MODE_HDR_MODES_BUF_OFFSET ) ; if ( ! eval_mode || qed_is_mode_match ( p_hwfn , & modes_buf_offset ) ) ecore_rd ( p_hwfn , p_ptt , DWORDS_TO_BYTES ( reg_data -> sts_clr_address ) ) ; } } }
For each block, clear the status of all parities
For each block clear the status of all parities
/* Check mode */ /* If Mode match: clear parity status */