src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_grc_dump_ctx_data(struct ecore_hwfn *p_hwfn,
				 struct ecore_ptt *p_ptt,
				 u32 *dump_buf,
				 bool dump,
				 const char *name,
				 u32 num_lids,
				 enum cm_ctx_types ctx_type, u8 storm_id)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	struct storm_defs *storm = &s_storm_defs[storm_id];
	u32 i, lid, lid_size, total_size;
	u32 rd_reg_addr, offset = 0;

	/* Convert quad-regs to dwords */
	lid_size = storm->cm_ctx_lid_sizes[dev_data->chip_id][ctx_type] * 4;

	if (!lid_size)
		return 0;

	total_size = num_lids * lid_size;

	offset += qed_grc_dump_mem_hdr(p_hwfn,
				       dump_buf + offset,
				       dump,
				       name,
				       0,
				       total_size,
				       lid_size * 32,
				       false, name, storm->letter);

	if (!dump)
		return offset + total_size;

	rd_reg_addr = BYTES_TO_DWORDS(storm->cm_ctx_rd_addr[ctx_type]);

	/* Dump context data */
	for (lid = 0; lid < num_lids; lid++) {
		for (i = 0; i < lid_size; i++) {
			ecore_wr(p_hwfn,
			       p_ptt, storm->cm_ctx_wr_addr, (i << 9) | lid);
			offset += qed_grc_dump_addr_range(p_hwfn,
							  p_ptt,
							  dump_buf + offset,
							  dump,
							  rd_reg_addr,
							  1,
							  false,
							  SPLIT_TYPE_NONE, 0);
		}
	}

	return offset;
}
/* Dumps GRC context data for the specified Storm.
 * Returns the dumped size in dwords.
 * The lid_size argument is specified in quad-regs.
 */
Dumps GRC context data for the specified Storm.
Returns the dumped size in dwords.
The lid_size argument is specified in quad-regs.
Dumps GRC context data for the specified Storm . Returns the dumped size in dwords . The lid_size argument is specified in quad - regs .
static u32 qed_grc_dump_ctx_data(struct ecore_hwfn *p_hwfn,
				 struct ecore_ptt *p_ptt,
				 u32 *dump_buf,
				 bool dump,
				 const char *name,
				 u32 num_lids,
				 enum cm_ctx_types ctx_type, u8 storm_id)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	struct storm_defs *storm = &s_storm_defs[storm_id];
	u32 i, lid, lid_size, total_size;
	u32 rd_reg_addr, offset = 0;
	lid_size = storm->cm_ctx_lid_sizes[dev_data->chip_id][ctx_type] * 4;
	if (!lid_size)
		return 0;
	total_size = num_lids * lid_size;
	offset += qed_grc_dump_mem_hdr(p_hwfn,
				       dump_buf + offset,
				       dump,
				       name,
				       0,
				       total_size,
				       lid_size * 32,
				       false, name, storm->letter);
	if (!dump)
		return offset + total_size;
	rd_reg_addr = BYTES_TO_DWORDS(storm->cm_ctx_rd_addr[ctx_type]);
	for (lid = 0; lid < num_lids; lid++) {
		for (i = 0; i < lid_size; i++) {
			ecore_wr(p_hwfn,
			       p_ptt, storm->cm_ctx_wr_addr, (i << 9) | lid);
			offset += qed_grc_dump_addr_range(p_hwfn,
							  p_ptt,
							  dump_buf + offset,
							  dump,
							  rd_reg_addr,
							  1,
							  false,
							  SPLIT_TYPE_NONE, 0);
		}
	}
	return offset;
}
static u32 qed_grc_dump_ctx_data ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump , const char * name , u32 num_lids , enum cm_ctx_types ctx_type , u8 storm_id ) { struct dbg_tools_data * dev_data = & p_hwfn -> dbg_info ; struct storm_defs * storm = & s_storm_defs [ storm_id ] ; u32 i , lid , lid_size , total_size ; u32 rd_reg_addr , offset = 0 ; lid_size = storm -> cm_ctx_lid_sizes [ dev_data -> chip_id ] [ ctx_type ] * 4 ; if ( ! lid_size ) return 0 ; total_size = num_lids * lid_size ; offset += qed_grc_dump_mem_hdr ( p_hwfn , dump_buf + offset , dump , name , 0 , total_size , lid_size * 32 , false , name , storm -> letter ) ; if ( ! dump ) return offset + total_size ; rd_reg_addr = BYTES_TO_DWORDS ( storm -> cm_ctx_rd_addr [ ctx_type ] ) ; for ( lid = 0 ; lid < num_lids ; lid ++ ) { for ( i = 0 ; i < lid_size ; i ++ ) { ecore_wr ( p_hwfn , p_ptt , storm -> cm_ctx_wr_addr , ( i << 9 ) | lid ) ; offset += qed_grc_dump_addr_range ( p_hwfn , p_ptt , dump_buf + offset , dump , rd_reg_addr , 1 , false , SPLIT_TYPE_NONE , 0 ) ; } } return offset ; }
Dumps GRC context data for the specified Storm.
Dumps GRC context data for the specified Storm .
/* Convert quad-regs to dwords */ /* Dump context data */