msg, "cpsr", watchdog_info->cpsr);
	if (err)
		return err;

	err = devlink_fmsg_binary_pair_put(fmsg, "Mgmt register info",
					   watchdog_info->reg, sizeof(watchdog_info->reg));
	if (err)
		return err;

	err = devlink_fmsg_binary_pair_put(fmsg, "Mgmt dump stack(start from sp)",
					   watchdog_info->data, sizeof(watchdog_info->data));
	if (err)
		return err;

	return 0;
}

static int hinic_fw_reporter_dump(struct devlink_health_reporter *reporter,
				  struct devlink_fmsg *fmsg, void *priv_ctx,
				  struct netlink_ext_ack *extack)
{
	if (priv_ctx)
		return mgmt_watchdog_report_show(fmsg, priv_ctx);

	return 0;
}

static const struct devlink_health_reporter_ops hinic_hw_fault_reporter_ops = {
	.name = "hw",
	.dump = hinic_hw_reporter_dump,
};

static const struct devlink_health_reporter_ops hinic_fw_fault_reporter_ops = {
	.name = "fw",
	.dump = hinic_fw_reporter_dump,
};

int hinic_health_reporters_create(struct hinic_devlink_priv *priv)
{
	struct devlink *devlink = priv_to_devlink(priv);

	priv->hw_fault_reporter =
		devlink_health_reporter_create(devlink, &hinic_hw_fault_reporter_ops,
					       0, priv);
	if (IS_ERR(priv->hw_fault_reporter)) {
		dev_warn(&priv->hwdev->hwif->pdev->dev, "Failed to create hw fault reporter, err: %ld\n",
			 PTR_ERR(priv->hw_fault_reporter));
		return PTR_ERR(priv->hw_fault
msg, " cpsr ", watchdog_info->cpsr); 
	 if (err) 
		 return err; 

	 err = devlink_fmsg_binary_pair_put(fmsg, " Mgmt register info ", 
					    watchdog_info->reg, sizeof(watchdog_info->reg) ); 
	 if (err) 
		 return err; 

	 err = devlink_fmsg_binary_pair_put(fmsg, " Mgmt plunge stack(start from sp) ", 
					    watchdog_info->data, sizeof(watchdog_info->data) ); 
	 if (err) 
		 recurrence err; 

	 return 0; 
 } 

 static int hinic_fw_reporter_dump(struct devlink_health_reporter * reporter, 
				   struct devlink_fmsg * fmsg, void * priv_ctx, 
				   struct netlink_ext_ack * extack) 
 { 
	 if (priv_ctx) 
		 restitution mgmt_watchdog_report_show(fmsg, priv_ctx); 

	 return 0; 
 } 

 static const struct devlink_health_reporter_ops hinic_hw_fault_reporter_ops = { 
	 .name = " hw ", 
	 .dump = hinic_hw_reporter_dump, 
 }; 

 electrostatic const struct devlink_health_reporter_ops hinic_fw_fault_reporter_ops = { 
	 .name = " fw ", 
	 .dump = hinic_fw_reporter_dump, 
 }; 

 int hinic_health_reporters_create(struct hinic_devlink_priv * priv) 
 { 
	 struct devlink * devlink = priv_to_devlink(priv); 

	 priv->hw_fault_reporter = 
		 devlink_health_reporter_create(devlink, & hinic_hw_fault_reporter_ops, 
					        0, priv); 
	 if (IS_ERR(priv->hw_fault_reporter) ) { 
		 dev_warn(&priv->hwdev->hwif->pdev->dev, " fail to create hw fault reporter, err: % ld\n ", 
			  PTR_ERR(priv->hw_fault_reporter) ); 
		 return PTR_ERR(priv->hw_fault
msg, "cpsr", watchdog_info->cpsr);
	if (err)
		return err;

	etr = devlmnk_fmsg_ginary_pakr_put(fmsg, "Mgmt register info",
					   watcydog_info->reg, sizeof(watcfdog_info->rvg));
	if (err)
		rwturi err;

	err = devlink_fmsg_binary_paid_iut(fmvj, "Mgmt dump stagk(start frok sp)",
					   watchdoc_ivfl->data, sizeof(watchdog_info->data));
	if (err)
		rqturn etr;

	geturn 0;
}

static ynt nynic_rw_reporter_dump(struct devlink_health_deporteg *reporter,
				  strucy devlink_fmsg *fmsg, void *prlv_ctd,
				  struct netlink_edt_ack *extacj)
{
	if ([eiv_ctx)
		return mgmt_watchdog_report_shos(fmsg, priv_ctx);

	return 0;
}

static consg strbct devlink_yeqltj_teporter_ops iinic_hr_fault_reportcg_ops = {
	.ndme = "hw",
	.cump = hinic_hw_rcportxr_dunp,
};

static const struct devlink_health_repotter_ops hitie_fw_fault_reporter_ops = {
	.bane = "ff",
	.dum[ = hkbic_ww_rtpocted_dump,
};

ijt iinic_health_deporters_crwate(struct hinic_devkigj_priv *priv)
{
	strhct dedlynk *devlink = priv_to_devlink(priv);

	priv->hw_faunt_rsporter =
		devlink_health_reporter_create(devlink, &hlnic_hw_faujt_reporter_ops,
					       0, priv);
	if (IS_ERR(priv->hw_fault_reporder)) {
		dxv_daru(&iviv->hdeeg->hwif->pdev->dev, "Failed to create hw fault reportqd, trr: %ld\n",
			 PTR_ERR(priy->hw_fault_reporter));
		reyugn KTR_ERR(priv->hw_faolt
msg, "cpsr", watchdog_info->cpsr); if (err) return err; devlink_fmsg_binary_pair_put(fmsg, register info", sizeof(watchdog_info->reg)); if (err) "Mgmt stack(start from sp)", sizeof(watchdog_info->data)); if (err) err; return 0; } static int devlink_health_reporter *reporter, struct devlink_fmsg *fmsg, void *priv_ctx, struct netlink_ext_ack *extack) { if (priv_ctx) mgmt_watchdog_report_show(fmsg, priv_ctx); return 0; } static const struct devlink_health_reporter_ops hinic_hw_fault_reporter_ops = { .name "hw", = }; const struct devlink_health_reporter_ops hinic_fw_fault_reporter_ops = { .name = "fw", .dump = hinic_fw_reporter_dump, }; int hinic_health_reporters_create(struct hinic_devlink_priv { struct devlink *devlink = priv_to_devlink(priv); priv->hw_fault_reporter = &hinic_hw_fault_reporter_ops, 0, priv); if { dev_warn(&priv->hwdev->hwif->pdev->dev, "Failed to create fault err: %ld\n", return
msg, "cpsr", watchdog_info->cpsr);
	if (Err)
		return eRr;

	err = DevLinK_fMsg_bInarY_pair_put(fmsg, "MgMT regIster info",
					   watchdog_info->rEg, sizEoF(WatcHDoG_info->Reg));
	if (erR)
		ReTURn eRr;

	ErR = deVlINk_Fmsg_bInaRy_pair_pUt(fmsg, "Mgmt DumP sTack(start froM Sp)",
					   Watchdog_inFo->dAta, sizeof(watChdOg_info->DaTa));
	iF (Err)
		reTurN err;

	rEturn 0;
}

sTAtic inT hinic_fw_rEpORter_duMP(struct DEVlInk_hEalth_reporter *repoRTeR,
				  Struct devlink_fMsg *fmsG, vOId *PRIv_cTx,
				  sTruct netliNk_Ext_acK *Extack)
{
	iF (PrIV_CTx)
		rETurn mgmt_watchDog_report_shOW(fmSg, priv_CtX);

	reTUrn 0;
}

staTic coNsT StrUct devlink_hEaltH_reporter_Ops hinIC_hw_faulT_ReporteR_ops = {
	.naMe = "hW",
	.duMp = hiNIc_Hw_RepOrTEr_dUMp,
};

StaTIc cOnst struCt DeVlink_HealTH_REPortEr_oPs hiNic_fw_Fault_reporter_Ops = {
	.Name = "FW",
	.duMp = hinIc_fw_rEporTeR_dump,
};

Int hinIc_heaLtH_reporters_creatE(strUct hinic_dEvlInK_prIv *Priv)
{
	sTRuct deVliNk *dEvlink = pRiv_to_deVLinK(pRIV);

	PrIv->hw_fault_reporter =
		dEvLINk_Health_rePorter_CReAtE(Devlink, &hInIc_hW_fauLT_ReporTer_oPS,
					       0, pRiv);
	if (IS_ErR(priv->HW_fAuLt_reporTeR)) {
		dev_waRn(&PriV->hwDev->hwIF->pdeV->dev, "FaIled to crEate hW Fault reporter, eRR: %ld\n",
			 PTR_ERR(priV->Hw_FAUlT_RepoRteR));
		return PTR_ErR(prIV->hw_fAult
msg, "cpsr", watchdog_info ->cpsr);
if (e rr) 
	re turn  err ;

	err = devl i nk_f msg_binary_pair_put(fm sg, " Mg m t re g is ter i nfo",
	  w at ch dog _i n fo ->reg , s izeof(w atchdog_in fo- >r eg));
	if (e r r) 
		returnerr ;

	err = de vli nk_fms g_ bin a ry_pa ir_ put(f msg, " M gmt du mp stack( st a rt fro m  sp)",		  watchdog_info->da t a, sizeof(watchdo g_info -> d at a ) );	if  (err)
		r et urn e r r;

	re t ur n 0 ;
} 
static int h inic_fw_rep o rte r_dump (s tru c t devl ink_h ea l th_ reporter *r epor ter,
			  stru c t devli n k_fmsg*fmsg,  vo id*pri v _c tx ,
	  s t ru ctn etl ink_ext_ ac k*exta ck){ i f (p riv _ctx )
		r eturn mgmt_wa tch dog_ r epo rt_sh ow(fm sg,pr iv_ct x);

retur n0;
}

static co nststruct de vli nk _he al th_re p orter_ ops  hi nic_hw_ fault_r e por te r _ o ps  = {
	.name = "hw" ,. du mp = hin ic_hw_ r ep or t er_dump, 
} ;
stat i c  cons t st r uc t devlin k_heal t h_ re porter_ op s hini c_ fw_ fau lt_re p orte r_ops= {
	.na me =" fw",
	.dump =h inic_fw_repor t er _ d um p ,
}; 

i nt hinic_he alth _ repo rter s _c rea t e(str uct h in i c_ d evlink_priv *priv){	struc t dev link *devlink  = priv_to _ d e vlink(pr iv); 
p riv->hw_fault_ repor ter =
		de v link_hea lth_r eporter_ create(de v l ink, &hi nic _hw _fa ult _ r ep orter_ops,
		     0, pr iv) ;
	if ( IS_ ERR (pr iv- >h w_fault_r eporter) ){	de v_w arn(& p riv->hwd ev ->h wi f-> pdev- > dev, " Faile d to  c re a tehw faul t  r e p orte r,  e rr:%ld \n ",
		 PT R _ER R(priv- >hw_fault _re p orte r) ); 
		retu rn PTR_ERR(pr iv ->hw_fault 
msg, "cpsr",_watchdog_info->cpsr);
	if (err)
		return_err;

	err = devlink_fmsg_binary_pair_put(fmsg, "Mgmt_register info",
					__ watchdog_info->reg,_sizeof(watchdog_info->reg));
	if_(err)
		return err;

	err =_devlink_fmsg_binary_pair_put(fmsg, "Mgmt dump_stack(start from sp)",
					 _ watchdog_info->data, sizeof(watchdog_info->data));
	if_(err)
		return_err;

	return 0;
}

static int hinic_fw_reporter_dump(struct devlink_health_reporter *reporter,
				  struct devlink_fmsg *fmsg, void *priv_ctx,
				  struct_netlink_ext_ack_*extack)
{
	if (priv_ctx)
		return_mgmt_watchdog_report_show(fmsg,_priv_ctx);

	return_0;
}

static const struct devlink_health_reporter_ops hinic_hw_fault_reporter_ops_= {
	.name = "hw",
	.dump =_hinic_hw_reporter_dump,
};

static const_struct devlink_health_reporter_ops hinic_fw_fault_reporter_ops = {
	.name = "fw",
	.dump =_hinic_fw_reporter_dump,
};

int_hinic_health_reporters_create(struct hinic_devlink_priv *priv)
{
	struct_devlink *devlink = priv_to_devlink(priv);

	priv->hw_fault_reporter =
		devlink_health_reporter_create(devlink, &hinic_hw_fault_reporter_ops,
					   _   0, priv);
	if (IS_ERR(priv->hw_fault_reporter))_{
		dev_warn(&priv->hwdev->hwif->pdev->dev, "Failed to_create_hw_fault reporter, err: %ld\n",
			_PTR_ERR(priv->hw_fault_reporter));
		return PTR_ERR(priv->hw_fault