]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 14 Mar 2025 08:50:36 +0000 (09:50 +0100)
commit1dba0a37644ed3022558165bbb5cb9bda540eaf7
tree8f40cfc867a89beaddef4a6cbc1a85230dcd8d18
parent51f6fc9eb1d77ae5cacc796fc043dedc1f0f0073
can: rcar_canfd: Fix page entries in the AFL list

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>
drivers/net/can/rcar/rcar_canfd.c