From b0d4743a8b83e266e43f59541821780de77a1641 Mon Sep 17 00:00:00 2001 From: Manish Bhardwaj Date: Wed, 19 Oct 2022 13:53:08 +0000 Subject: [PATCH] can: reinitialize message ram during resume Getting below error while data transfer on CAN bus when target coming out of SC7 cycle. mttcan c310000.mttcan can0: mram Bit error detectedand uncorrected reinitialize message ram in resume path to fix this issue Bug 3837424 Change-Id: Ice275511fd04a91e30665f8ff826da6364b4e4fa Signed-off-by: Manish Bhardwaj Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2795002 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Suresh Venkatachalam Reviewed-by: Sachin Nikam GVS: Gerrit_Virtual_Submit Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2832904 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/net/can/mttcan/native/m_ttcan_linux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/can/mttcan/native/m_ttcan_linux.c b/drivers/net/can/mttcan/native/m_ttcan_linux.c index bd4f604f..7496de5b 100644 --- a/drivers/net/can/mttcan/native/m_ttcan_linux.c +++ b/drivers/net/can/mttcan/native/m_ttcan_linux.c @@ -146,6 +146,9 @@ static int mttcan_hw_reinit(const struct mttcan_priv *priv) struct ttcan_controller *ttcan = priv->ttcan; + /* initialize mttcan message RAM with 0s */ + ttcan_mesg_ram_init(ttcan); + ttcan_set_ok(ttcan); err = ttcan_set_config_change_enable(ttcan);