osi: core: add m2m sync error detection and reporting

Issue: New safety requirement to detect
and report M2M eqos sync error.

Fix: add support for error detection and
reporting.

Bug 4033627

Change-Id: I377b8f11a6518841e21fe9e1ab3682447b31138b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2875581
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Rakesh Goyal
2023-03-23 13:26:43 +05:30
committed by mobile promotions
parent b49b61a253
commit f3a4320760
3 changed files with 107 additions and 7 deletions

View File

@@ -1548,6 +1548,15 @@ nve32_t hsi_common_error_inject(struct osi_core_priv_data *osi_core,
osi_core->hsi.report_err = OSI_ENABLE;
osi_core->hsi.report_count_err[XPCS_WRITE_FAIL_IDX] = OSI_ENABLE;
break;
case OSI_M2M_TSC_READ_ERR:
case OSI_M2M_TIME_CAL_ERR:
case OSI_M2M_ADJ_FREQ_ERR:
case OSI_M2M_ADJ_TIME_ERR:
case OSI_M2M_SET_TIME_ERR:
case OSI_M2M_CONFIG_PTP_ERR:
osi_core->hsi.report_err = OSI_ENABLE;
osi_core->hsi.err_code[MAC2MAC_ERR_IDX] = error_code;
break;
default:
OSI_CORE_ERR(osi_core->osd, OSI_LOG_ARG_HW_FAIL,
"Invalid error code\n", (nveu32_t)error_code);