can: c_can: don't cache TX messages for C_CAN cores
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 23 Sep 2022 11:42:23 +0000 (13:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:39:37 +0000 (10:39 +0200)
commitd134b0f7a9b9e2b9a60beb6483585d08dbbbb37d
tree883377ac15bf1f5e0ff85f04128c99b3791118e0
parent6fff203793cb91b5bb5b43e3db4e89f868d78ff4
can: c_can: don't cache TX messages for C_CAN cores

commit 81d192c2ce74157e717e1fc4b68791f82f7499d4 upstream.

As Jacob noticed, the optimization introduced in 387da6bc7a82 ("can:
c_can: cache frames to operate as a true FIFO") doesn't properly work
on C_CAN, but on D_CAN IP cores. The exact reasons are still unknown.

For now disable caching if CAN frames in the TX path for C_CAN cores.

Fixes: 387da6bc7a82 ("can: c_can: cache frames to operate as a true FIFO")
Link: https://lore.kernel.org/all/20220928083354.1062321-1-mkl@pengutronix.de
Link: https://lore.kernel.org/all/15a8084b-9617-2da1-6704-d7e39d60643b@gmail.com
Reported-by: Jacob Kroon <jacob.kroon@gmail.com>
Tested-by: Jacob Kroon <jacob.kroon@gmail.com>
Cc: stable@vger.kernel.org # v5.15
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/c_can/c_can.h
drivers/net/can/c_can/c_can_main.c