src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_grc_dump_vfc_ram(struct ecore_hwfn *p_hwfn,
				struct ecore_ptt *p_ptt,
				u32 *dump_buf,
				bool dump,
				u8 storm_id, struct vfc_ram_defs *ram_defs)
{
	u32 total_size = ram_defs->num_rows * VFC_RAM_RESP_DWORDS;
	struct storm_defs *storm = &s_storm_defs[storm_id];
	u32 ram_addr[VFC_RAM_ADDR_DWORDS] = { 0 };
	u32 ram_cmd[VFC_RAM_CMD_DWORDS] = { 0 };
	u32 row, offset = 0;

	offset += qed_grc_dump_mem_hdr(p_hwfn,
				       dump_buf + offset,
				       dump,
				       ram_defs->mem_name,
				       0,
				       total_size,
				       256,
				       false,
				       ram_defs->type_name,
				       storm->letter);

	if (!dump)
		return offset + total_size;

	/* Prepare RAM address */
	SET_VAR_FIELD(ram_addr, VFC_RAM_ADDR, OP, VFC_OPCODE_RAM_RD);

	/* Read VFC RAM data */
	for (row = ram_defs->base_row;
	     row < ram_defs->base_row + ram_defs->num_rows; row++) {
		SET_VAR_FIELD(ram_addr, VFC_RAM_ADDR, ROW, row);
		offset += qed_grc_dump_read_from_vfc(p_hwfn,
						     p_ptt,
						     storm,
						     ram_cmd,
						     VFC_RAM_CMD_DWORDS,
						     ram_addr,
						     VFC_RAM_ADDR_DWORDS,
						     VFC_RAM_RESP_DWORDS,
						     dump_buf + offset);
	}

	return offset;
}
/* Dump VFC RAM. Returns the dumped size in dwords. */
Dump VFC RAM. Returns the dumped size in dwords.
Dump VFC RAM . Returns the dumped size in dwords .
static u32 qed_grc_dump_vfc_ram(struct ecore_hwfn *p_hwfn,
				struct ecore_ptt *p_ptt,
				u32 *dump_buf,
				bool dump,
				u8 storm_id, struct vfc_ram_defs *ram_defs)
{
	u32 total_size = ram_defs->num_rows * VFC_RAM_RESP_DWORDS;
	struct storm_defs *storm = &s_storm_defs[storm_id];
	u32 ram_addr[VFC_RAM_ADDR_DWORDS] = { 0 };
	u32 ram_cmd[VFC_RAM_CMD_DWORDS] = { 0 };
	u32 row, offset = 0;
	offset += qed_grc_dump_mem_hdr(p_hwfn,
				       dump_buf + offset,
				       dump,
				       ram_defs->mem_name,
				       0,
				       total_size,
				       256,
				       false,
				       ram_defs->type_name,
				       storm->letter);
	if (!dump)
		return offset + total_size;
	SET_VAR_FIELD(ram_addr, VFC_RAM_ADDR, OP, VFC_OPCODE_RAM_RD);
	for (row = ram_defs->base_row;
	     row < ram_defs->base_row + ram_defs->num_rows; row++) {
		SET_VAR_FIELD(ram_addr, VFC_RAM_ADDR, ROW, row);
		offset += qed_grc_dump_read_from_vfc(p_hwfn,
						     p_ptt,
						     storm,
						     ram_cmd,
						     VFC_RAM_CMD_DWORDS,
						     ram_addr,
						     VFC_RAM_ADDR_DWORDS,
						     VFC_RAM_RESP_DWORDS,
						     dump_buf + offset);
	}
	return offset;
}
static u32 qed_grc_dump_vfc_ram ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump , u8 storm_id , struct vfc_ram_defs * ram_defs ) { u32 total_size = ram_defs -> num_rows * VFC_RAM_RESP_DWORDS ; struct storm_defs * storm = & s_storm_defs [ storm_id ] ; u32 ram_addr [ VFC_RAM_ADDR_DWORDS ] = { 0 } ; u32 ram_cmd [ VFC_RAM_CMD_DWORDS ] = { 0 } ; u32 row , offset = 0 ; offset += qed_grc_dump_mem_hdr ( p_hwfn , dump_buf + offset , dump , ram_defs -> mem_name , 0 , total_size , 256 , false , ram_defs -> type_name , storm -> letter ) ; if ( ! dump ) return offset + total_size ; SET_VAR_FIELD ( ram_addr , VFC_RAM_ADDR , OP , VFC_OPCODE_RAM_RD ) ; for ( row = ram_defs -> base_row ; row < ram_defs -> base_row + ram_defs -> num_rows ; row ++ ) { SET_VAR_FIELD ( ram_addr , VFC_RAM_ADDR , ROW , row ) ; offset += qed_grc_dump_read_from_vfc ( p_hwfn , p_ptt , storm , ram_cmd , VFC_RAM_CMD_DWORDS , ram_addr , VFC_RAM_ADDR_DWORDS , VFC_RAM_RESP_DWORDS , dump_buf + offset ) ; } return offset ; }
Dump VFC RAM.
Dump VFC RAM .
/* Prepare RAM address */ /* Read VFC RAM data */