src/dpdk/drivers/net/qede/qede_debug.c
static void qed_bus_disable_blocks(struct ecore_hwfn *p_hwfn,
				   struct ecore_ptt *p_ptt)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	u32 block_id;

	/* Disable all blocks */
	for (block_id = 0; block_id < MAX_BLOCK_ID; block_id++) {
		const struct dbg_block_chip *block_per_chip =
		    qed_get_dbg_block_per_chip(p_hwfn,
					       (enum block_id)block_id);

		if (GET_FIELD(block_per_chip->flags,
			      DBG_BLOCK_CHIP_IS_REMOVED) ||
		    dev_data->block_in_reset[block_id])
			continue;

		/* Disable debug bus */
		if (GET_FIELD(block_per_chip->flags,
			      DBG_BLOCK_CHIP_HAS_DBG_BUS)) {
			u32 dbg_en_addr =
				block_per_chip->dbg_dword_enable_reg_addr;
			u16 modes_buf_offset =
			    GET_FIELD(block_per_chip->dbg_bus_mode.data,
				      DBG_MODE_HDR_MODES_BUF_OFFSET);
			bool eval_mode =
			    GET_FIELD(block_per_chip->dbg_bus_mode.data,
				      DBG_MODE_HDR_EVAL_MODE) > 0;

			if (!eval_mode ||
			    qed_is_mode_match(p_hwfn, &modes_buf_offset))
				ecore_wr(p_hwfn, p_ptt,
				       DWORDS_TO_BYTES(dbg_en_addr),
				       0);
		}
	}
}
/* Disable debug bus in all blocks */
Disable debug bus in all blocks
Disable debug bus in all blocks
static void qed_bus_disable_blocks(struct ecore_hwfn *p_hwfn,
				   struct ecore_ptt *p_ptt)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	u32 block_id;
	for (block_id = 0; block_id < MAX_BLOCK_ID; block_id++) {
		const struct dbg_block_chip *block_per_chip =
		    qed_get_dbg_block_per_chip(p_hwfn,
					       (enum block_id)block_id);
		if (GET_FIELD(block_per_chip->flags,
			      DBG_BLOCK_CHIP_IS_REMOVED) ||
		    dev_data->block_in_reset[block_id])
			continue;
		if (GET_FIELD(block_per_chip->flags,
			      DBG_BLOCK_CHIP_HAS_DBG_BUS)) {
			u32 dbg_en_addr =
				block_per_chip->dbg_dword_enable_reg_addr;
			u16 modes_buf_offset =
			    GET_FIELD(block_per_chip->dbg_bus_mode.data,
				      DBG_MODE_HDR_MODES_BUF_OFFSET);
			bool eval_mode =
			    GET_FIELD(block_per_chip->dbg_bus_mode.data,
				      DBG_MODE_HDR_EVAL_MODE) > 0;
			if (!eval_mode ||
			    qed_is_mode_match(p_hwfn, &modes_buf_offset))
				ecore_wr(p_hwfn, p_ptt,
				       DWORDS_TO_BYTES(dbg_en_addr),
				       0);
		}
	}
}
static void qed_bus_disable_blocks ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt ) { struct dbg_tools_data * dev_data = & p_hwfn -> dbg_info ; u32 block_id ; for ( block_id = 0 ; block_id < MAX_BLOCK_ID ; block_id ++ ) { const struct dbg_block_chip * block_per_chip = qed_get_dbg_block_per_chip ( p_hwfn , ( enum block_id ) block_id ) ; if ( GET_FIELD ( block_per_chip -> flags , DBG_BLOCK_CHIP_IS_REMOVED ) || dev_data -> block_in_reset [ block_id ] ) continue ; if ( GET_FIELD ( block_per_chip -> flags , DBG_BLOCK_CHIP_HAS_DBG_BUS ) ) { u32 dbg_en_addr = block_per_chip -> dbg_dword_enable_reg_addr ; u16 modes_buf_offset = GET_FIELD ( block_per_chip -> dbg_bus_mode . data , DBG_MODE_HDR_MODES_BUF_OFFSET ) ; bool eval_mode = GET_FIELD ( block_per_chip -> dbg_bus_mode . data , DBG_MODE_HDR_EVAL_MODE ) > 0 ; if ( ! eval_mode || qed_is_mode_match ( p_hwfn , & modes_buf_offset ) ) ecore_wr ( p_hwfn , p_ptt , DWORDS_TO_BYTES ( dbg_en_addr ) , 0 ) ; } } }
Disable debug bus in all blocks
Disable debug bus in all blocks
/* Disable all blocks */ /* Disable debug bus */