]> 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 20:59:00 +0000 (21:59 +0100)
commita8a89a6d375ea94c033ffd3a816f0238b7d9ad6a
tree9c376f3903124655b6b40a4dedf6f8f4eafc4c5a
parent78f6d8f8fcff913f2fc6475d8c9d7e11a4d11378
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