src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_dump_common_global_params(struct ecore_hwfn *p_hwfn,
					 struct ecore_ptt *p_ptt,
					 u32 *dump_buf,
					 bool dump,
					 u8 num_specific_global_params)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	char sw_platform_str[MAX_SW_PLTAFORM_STR_SIZE];
	u32 offset = 0;
	u8 num_params;

	/* Fill platform string */
	ecore_set_platform_str(p_hwfn, sw_platform_str,
			       MAX_SW_PLTAFORM_STR_SIZE);

	/* Dump global params section header */
	num_params = NUM_COMMON_GLOBAL_PARAMS + num_specific_global_params +
		(dev_data->chip_id == CHIP_BB ? 1 : 0);
	offset += qed_dump_section_hdr(dump_buf + offset,
				       dump, "global_params", num_params);

	/* Store params */
	offset += qed_dump_fw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump);
	offset += qed_dump_mfw_ver_param(p_hwfn,
					 p_ptt, dump_buf + offset, dump);
	offset += qed_dump_chip_revision_param(p_hwfn,
					       p_ptt, dump_buf + offset, dump);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "tools-version", TOOLS_VERSION);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump,
				     "chip",
				     s_chip_defs[dev_data->chip_id].name);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump,
				     "platform",
				     s_hw_type_defs[dev_data->hw_type].name);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump, "sw-platform", sw_platform_str);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "pci-func", p_hwfn->abs_pf_id);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "epoch", OSAL_GET_EPOCH(p_hwfn));
	if (dev_data->chip_id == CHIP_BB)
		offset += qed_dump_num_param(dump_buf + offset,
					     dump, "path",
					     ECORE_PATH_ID(p_hwfn));

	return offset;
}
/* Writes the common global params to the specified buffer.
 * Returns the dumped size in dwords.
 */
Writes the common global params to the specified buffer.
Returns the dumped size in dwords.
Writes the common global params to the specified buffer . Returns the dumped size in dwords .
static u32 qed_dump_common_global_params(struct ecore_hwfn *p_hwfn,
					 struct ecore_ptt *p_ptt,
					 u32 *dump_buf,
					 bool dump,
					 u8 num_specific_global_params)
{
	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
	char sw_platform_str[MAX_SW_PLTAFORM_STR_SIZE];
	u32 offset = 0;
	u8 num_params;
	ecore_set_platform_str(p_hwfn, sw_platform_str,
			       MAX_SW_PLTAFORM_STR_SIZE);
	num_params = NUM_COMMON_GLOBAL_PARAMS + num_specific_global_params +
		(dev_data->chip_id == CHIP_BB ? 1 : 0);
	offset += qed_dump_section_hdr(dump_buf + offset,
				       dump, "global_params", num_params);
	offset += qed_dump_fw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump);
	offset += qed_dump_mfw_ver_param(p_hwfn,
					 p_ptt, dump_buf + offset, dump);
	offset += qed_dump_chip_revision_param(p_hwfn,
					       p_ptt, dump_buf + offset, dump);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "tools-version", TOOLS_VERSION);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump,
				     "chip",
				     s_chip_defs[dev_data->chip_id].name);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump,
				     "platform",
				     s_hw_type_defs[dev_data->hw_type].name);
	offset += qed_dump_str_param(dump_buf + offset,
				     dump, "sw-platform", sw_platform_str);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "pci-func", p_hwfn->abs_pf_id);
	offset += qed_dump_num_param(dump_buf + offset,
				     dump, "epoch", OSAL_GET_EPOCH(p_hwfn));
	if (dev_data->chip_id == CHIP_BB)
		offset += qed_dump_num_param(dump_buf + offset,
					     dump, "path",
					     ECORE_PATH_ID(p_hwfn));
	return offset;
}
static u32 qed_dump_common_global_params ( struct ecore_hwfn * p_hwfn , struct ecore_ptt * p_ptt , u32 * dump_buf , bool dump , u8 num_specific_global_params ) { struct dbg_tools_data * dev_data = & p_hwfn -> dbg_info ; char sw_platform_str [ MAX_SW_PLTAFORM_STR_SIZE ] ; u32 offset = 0 ; u8 num_params ; ecore_set_platform_str ( p_hwfn , sw_platform_str , MAX_SW_PLTAFORM_STR_SIZE ) ; num_params = NUM_COMMON_GLOBAL_PARAMS + num_specific_global_params + ( dev_data -> chip_id == CHIP_BB ? 1 : 0 ) ; offset += qed_dump_section_hdr ( dump_buf + offset , dump , " " , num_params ) ; offset += qed_dump_fw_ver_param ( p_hwfn , p_ptt , dump_buf + offset , dump ) ; offset += qed_dump_mfw_ver_param ( p_hwfn , p_ptt , dump_buf + offset , dump ) ; offset += qed_dump_chip_revision_param ( p_hwfn , p_ptt , dump_buf + offset , dump ) ; offset += qed_dump_num_param ( dump_buf + offset , dump , " " , TOOLS_VERSION ) ; offset += qed_dump_str_param ( dump_buf + offset , dump , " " , s_chip_defs [ dev_data -> chip_id ] . name ) ; offset += qed_dump_str_param ( dump_buf + offset , dump , " " , s_hw_type_defs [ dev_data -> hw_type ] . name ) ; offset += qed_dump_str_param ( dump_buf + offset , dump , " " , sw_platform_str ) ; offset += qed_dump_num_param ( dump_buf + offset , dump , " " , p_hwfn -> abs_pf_id ) ; offset += qed_dump_num_param ( dump_buf + offset , dump , " " , OSAL_GET_EPOCH ( p_hwfn ) ) ; if ( dev_data -> chip_id == CHIP_BB ) offset += qed_dump_num_param ( dump_buf + offset , dump , " " , ECORE_PATH_ID ( p_hwfn ) ) ; return offset ; }
Writes the common global params to the specified buffer.
Writes the common global params to the specified buffer .
/* Fill platform string */ /* Dump global params section header */ /* Store params */