From d3e47da5a44c2b40866bd25c63aaa3bca39e2cdd Mon Sep 17 00:00:00 2001 From: Sushil Kumar Singh Date: Wed, 5 Jul 2023 13:27:01 +0530 Subject: [PATCH] nvethernet: disable HSI error reporting if EPL is disabled. Issue: During iperf test on pegasus board on customer observed below error periodically nvethernet 6810000.ethernet: Failed to report error: reporter ID: 0x0, Error code: 0x1002, return: -19 Fix: Disable HSI error reporting from hsi work queue function for L4T platforms if safety component EPL is not supported. Bug 4090612 Change-Id: Ifc51dd93fb16c1dbf7e42c648ca14443bb40550b Signed-off-by: Sushil Kumar Singh (cherry picked from commit 983ddcae450c36cde9ec79433e16a4ed5aa89319) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313872 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318856 Tested-by: Wayne Wang (SW-TEGRA) Reviewed-by: Bibek Basu GVS: buildbot_gerritrpt --- drivers/net/ethernet/nvidia/nvethernet/ether_linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c index 076235ad..d5c79613 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c @@ -332,8 +332,9 @@ static inline void ether_hsi_work_func(struct work_struct *work) mutex_unlock(&pdata->hsi_lock); } - if (osi_core->hsi.report_err == OSI_ENABLE || - osi_core->hsi.macsec_report_err == OSI_ENABLE) + if (osi_core->hsi.enabled == OSI_ENABLE && + (osi_core->hsi.report_err == OSI_ENABLE || + osi_core->hsi.macsec_report_err == OSI_ENABLE)) ether_common_isr_thread(0, (void *)pdata); schedule_delayed_work(&pdata->ether_hsi_work,