linux/drivers/net/can
Marc Kleine-Budde 9dcdf8fdca can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd
[ Upstream commit 3a0a88fcba ]

This patch updates the workaround for a problem similar to erratum
DS80000789E 6 of the mcp2518fd, the other variants of the chip
family (mcp2517fd and mcp251863) are probably also affected.

Erratum DS80000789E 6 says "reading of the FIFOCI bits in the FIFOSTA
register for an RX FIFO may be corrupted". However observation shows
that this problem is not limited to RX FIFOs but also effects the TEF
FIFO.

In the bad case, the driver reads a too large head index. As the FIFO
is implemented as a ring buffer, this results in re-handling old CAN
transmit complete events.

Every transmit complete event contains with a sequence number that
equals to the sequence number of the corresponding TX request. This
way old TX complete events can be detected.

If the original driver detects a non matching sequence number, it
prints an info message and tries again later. As wrong sequence
numbers can be explained by the erratum DS80000789E 6, demote the info
message to debug level, streamline the code and update the comments.

Keep the behavior: If an old CAN TX complete event is detected, abort
the iteration and mark the number of valid CAN TX complete events as
processed in the chip by incrementing the FIFO's tail index.

Cc: Stefan Althöfer <Stefan.Althoefer@janztec.com>
Cc: Thomas Kopp <thomas.kopp@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-08-14 13:52:47 +02:00
..
c_can can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
cc770 can: cc770: cc770_isa_probe(): add missing free_cc770dev() 2022-11-24 16:09:53 +01:00
ctucanfd can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
dev can: netlink: Fix TDCO calculation using the old data bittiming 2024-02-23 09:12:47 +01:00
flexcan can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
ifi_canfd can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
m_can can: tcan4x5x: Fix use of register error status mask 2022-12-31 13:32:27 +01:00
mscan can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
peak_canfd can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
rcar can: rcar_canfd: Fix R-Car V3U GAFLCFG field accesses 2023-03-10 09:32:58 +01:00
sja1000 can: sja1000_isa: sja1000_isa_probe(): add missing free_sja1000dev() 2022-11-24 16:09:39 +01:00
slcan can: slcan: fix freed work crash 2022-12-07 10:32:24 +01:00
softing can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
spi can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd 2024-08-14 13:52:47 +02:00
usb can: kvaser_usb: fix return value for hif_usb_send_regout 2024-07-25 09:49:15 +02:00
at91_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
can327.c can: can327: flush TX_work on ldisc .close() 2022-12-07 10:32:36 +01:00
grcan.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
janz-ican3.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
Kconfig can: sun4i_can: Only show Kconfig if ARCH_SUNXI is set 2023-10-19 23:08:52 +02:00
kvaser_pciefd.c can: kvaser_pciefd: Set hardware timestamp on transmitted packets 2023-07-19 16:21:11 +02:00
Makefile can: slcan: move driver into separate sub directory 2022-07-03 11:34:44 +02:00
pch_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
sun4i_can.c can: sun4i_can: Add support for the Allwinner D1 2023-09-23 11:11:02 +02:00
ti_hecc.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00
vcan.c can: dev: add CAN XL support to virtual CAN 2022-09-15 09:08:09 +02:00
vxcan.c net: validate veth and vxcan peer ifindexes 2023-08-30 16:11:02 +02:00
xilinx_can.c can: dev: fix skb drop check 2022-11-07 14:00:27 +01:00