src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_grc_dump_reg_entry_skip(struct ecore_hwfn *p_hwfn,
				       struct ecore_ptt *p_ptt,
				       u32 *dump_buf,
				       bool dump,
				       u32 addr,
				       u32 total_len,
				       u32 read_len, u32 skip_len)
{
	u32 offset = 0, reg_offset = 0;

	offset += qed_grc_dump_reg_entry_hdr(dump_buf, dump, addr, total_len);

	if (!dump)
		return offset + total_len;

	while (reg_offset < total_len) {
		u32 curr_len = OSAL_MIN_T(u32, read_len,
					  total_len - reg_offset);

		offset += qed_grc_dump_addr_range(p_hwfn,
						  p_ptt,
						  dump_buf + offset,
						  dump,  addr, curr_len, false,
						  SPLIT_TYPE_NONE, 0);
		reg_offset += curr_len;
		addr += curr_len;

		if (reg_offset < total_len) {
			curr_len = OSAL_MIN_T(u32, skip_len,
					      total_len - skip_len);
			memset(dump_buf + offset, 0, DWORDS_TO_BYTES(curr_len));
			offset += curr_len;
			reg_offset += curr_len;
			addr += curr_len;
		}
	}

	return offset;
}
/* Dumps GRC registers sequence with skip cycle.
 * Returns the dumped size in dwords.
 * - addr:	start GRC address in dwords
 * - total_len:	total no. of dwords to dump
 * - read_len:	no. consecutive dwords to read
 * - skip_len:	no. of dwords to skip (and fill with zeros)
 */
Dumps GRC registers sequence with skip cycle.
Returns the dumped size in dwords.
- addr:      start GRC address in dwords
- total_len: total no. of dwords to dump
- read_len:  no. consecutive dwords to read
- skip_len:  no. of dwords to skip (and fill with zeros)
Dumps GRC registers sequence with skip cycle . Returns the dumped size in dwords . - addr : start GRC address in dwords - total_len : total no . of dwords to dump - read_len : no . consecutive dwords to read - skip_len : no . of dwords to skip ( and fill with zeros )
static u32 qed_grc_dump_reg_entry_skip(struct ecore_hwfn *p_hwfn,
				       struct ecore_ptt *p_ptt,
				       u32 *dump_buf,
				       bool dump,
				       u32 addr,
				       u32 total_len,
				       u32 read_len, u32 skip_len)
{
	u32 offset = 0, reg_offset = 0;
	offset += qed_grc_dump_reg_entry_hdr(dump_buf, dump, addr, total_len);
	if (!dump)
		return offset + total_len;
	while (reg_offset < total_len) {
		u32 curr_len = OSAL_MIN_T(u32, read_len,
					  total_len - reg_offset);
		offset += qed_grc_dump_addr_range(p_hwfn,
						  p_ptt,
						  dump_buf + offset,
						  dump,  addr, curr_len, false,
						  SPLIT_TYPE_NONE, 0);
		reg_offset += curr_len;
		addr += curr_len;
		if (reg_offset < total_len) {
			curr_len = OSAL_MIN_T(u32, skip_len,
					      total_len - skip_len);
			memset(dump_buf + offset, 0, DWORDS_TO_BYTES(curr_len));
			offset += curr_len;
			reg_offset += curr_len;
			addr += curr_len;
		}
	}
	return offset;
}
static u32 qed_grc_dump_reg_entry_skip ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump , u32 addr , u32 total_len , u32 read_len , u32 skip_len ) { u32 offset = 0 , reg_offset = 0 ; offset += qed_grc_dump_reg_entry_hdr ( dump_buf , dump , addr , total_len ) ; if ( ! dump ) return offset + total_len ; while ( reg_offset < total_len ) { u32 curr_len = OSAL_MIN_T ( u32 , read_len , total_len - reg_offset ) ; offset += qed_grc_dump_addr_range ( p_hwfn , p_ptt , dump_buf + offset , dump , addr , curr_len , false , SPLIT_TYPE_NONE , 0 ) ; reg_offset += curr_len ; addr += curr_len ; if ( reg_offset < total_len ) { curr_len = OSAL_MIN_T ( u32 , skip_len , total_len - skip_len ) ; memset ( dump_buf + offset , 0 , DWORDS_TO_BYTES ( curr_len ) ) ; offset += curr_len ; reg_offset += curr_len ; addr += curr_len ; } } return offset ; }
Dumps GRC registers sequence with skip cycle.
Dumps GRC registers sequence with skip cycle .