]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: hi311x: hi3110_can_ist(): fix {rx,tx}_errors statistics
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Fri, 22 Nov 2024 22:15:49 +0000 (23:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:02 +0000 (20:03 +0100)
commit4bf39aee3b702e4ee1678f9812690f2c18cfd9c1
treec8e23d1b589b8aaf32dfe4228a2d228d6ad83e99
parent377647078baf039f6e98596ffa7160082a95c7cb
can: hi311x: hi3110_can_ist(): fix {rx,tx}_errors statistics

[ Upstream commit 3e4645931655776e757f9fb5ae29371cd7cb21a2 ]

The hi3110_can_ist() function was incorrectly incrementing only the
receive error counter, even in cases of bit or acknowledgment errors that
occur during transmission.

The fix the issue by incrementing the appropriate counter based on the
type of error.

Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241122221650.633981-9-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/spi/hi311x.c