Commit e48b894a authored by Shannon Nelson's avatar Shannon Nelson Committed by Jakub Kicinski
Browse files

pds_core: no health reporter in VF



Make sure the health reporter is set up before we use it in
our devlink health updates, especially since the VF doesn't
set up the health reporter.

Fixes: 25b450c0 ("pds_core: add devlink health facilities")
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230824161754.34264-3-shannon.nelson@amd.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 91202ce7
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -524,6 +524,7 @@ static void pdsc_fw_down(struct pdsc *pdsc)
	}

	/* Notify clients of fw_down */
	if (pdsc->fw_reporter)
		devlink_health_report(pdsc->fw_reporter, "FW down reported", pdsc);
	pdsc_notify(PDS_EVENT_RESET, &reset_event);

@@ -554,6 +555,7 @@ static void pdsc_fw_up(struct pdsc *pdsc)

	/* Notify clients of fw_up */
	pdsc->fw_recoveries++;
	if (pdsc->fw_reporter)
		devlink_health_reporter_state_update(pdsc->fw_reporter,
						     DEVLINK_HEALTH_REPORTER_STATE_HEALTHY);
	pdsc_notify(PDS_EVENT_RESET, &reset_event);