]> git.dujemihanovic.xyz Git - linux.git/commit
can: rockchip_canfd: implement workaround for erratum 6
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 24 Nov 2023 08:27:00 +0000 (09:27 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Sep 2024 12:41:52 +0000 (14:41 +0200)
commit58d3cc65a241953d40490329fb7638a93f95dd78
tree6459eaa2bd76e74ad971ced2f13de6f2f4c7329c
parentb6661d73290c572645ebdf7119974927444f4a7d
can: rockchip_canfd: implement workaround for erratum 6

The rk3568 CAN-FD errata sheet as of Tue 07 Nov 2023 11:25:31 +08:00
says:

| The CAN controller's transmission of extended frames may
| intermittently change into standard frames.
|
| When using the CAN controller to send extended frames, if the
| 'tx_req' is configured as 1 and coincides with the internal
| transmission point, the extended frame will be transmitted onto the
| bus in the format of a standard frame.

To work around Erratum 6, the driver is in self-receiving mode (RXSTX)
and all received CAN frames are passed through rkcanfd_rxstx_filter().

Add a check in rkcanfd_rxstx_filter() whether the received frame
corresponds to the current outgoing frame, but the extended CAN ID has
been mangled to a standard ID. In this case re-send the original CAN
frame.

Tested-by: Alibek Omarov <a1ba.omarov@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20240904-rockchip-canfd-v5-12-8ae22bcb27cc@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/rockchip/rockchip_canfd-rx.c
drivers/net/can/rockchip/rockchip_canfd-tx.c
drivers/net/can/rockchip/rockchip_canfd.h