]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: rcar_canfd: Fix page entries in the AFL list
authorBiju Das <biju.das.jz@bp.renesas.com>
Fri, 7 Mar 2025 17:03:27 +0000 (17:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Mar 2025 21:03:28 +0000 (22:03 +0100)
commiteb14937ece4fa97c87a970efc88e92e52980206a
tree7a0a911ff581d81f8401609eeddc4ca4e86908a4
parent76a13fad5a3fdf9a68957e58eed010235dfcede4
can: rcar_canfd: Fix page entries in the AFL list

commit 1dba0a37644ed3022558165bbb5cb9bda540eaf7 upstream.

There are a total of 96 AFL pages and each page has 16 entries with
registers CFDGAFLIDr, CFDGAFLMr, CFDGAFLP0r, CFDGAFLP1r holding
the rule entries (r = 0..15).

Currently, RCANFD_GAFL* macros use a start variable to find AFL entries,
which is incorrect as the testing on RZ/G3E shows ch1 and ch4
gets a start value of 0 and the register contents are overwritten.

Fix this issue by using rule_entry corresponding to the channel
to find the page entries in the AFL list.

Fixes: dd3bd23eb438 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
Cc: stable@vger.kernel.org
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20250307170330.173425-3-biju.das.jz@bp.renesas.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/rcar/rcar_canfd.c