On 11.01.2023 23:30:04, Marc Kleine-Budde wrote: > On 11.01.2023 23:20:37, Marc Kleine-Budde wrote: > > this is a proof of concept implementation to work around the > > "double-RX" erratum found by Stefan Althöfer. > > > > With the help of Thomas we found out that the chip has a time window > > after receiving a CAN frame where the RX FIFO STA register content is > > not read correctly. > > > > From the driver's point of view, everything looks consistent at first, > > but the head index of the chip is too large. This causes the driver to > > rehandle old CAN frames that have already been processed. > > > > The workaround uses the RX timestamp to distinguish between new and > > old data. As soon as old data is found, processing is stopped. > > > > The series applies against current net/main. The patches lack proper > > descriptions, I'll add them in the next round. > > > > Happy testing, > > Marc > > > > Link: https://lore.kernel.org/all/FR0P281MB1966273C216630B120ABB6E197E89@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > If you add a "#define DEBUG" before any #includes in mcp251xfd-rc.c > you'll get a debug message like this if the workaround triggers: > > | Jan 11 22:53:10 riot kernel: mcp251xfd spi1.0 mcp251xfd0: mcp251xfd_handle_rxif_one: last_valid=0x17395fba3d56bb9c ts=0x17395fba3d08ee9e d=0xffffffffffb23302 data=00 02 80 fa 24 cc 43 41 - Dropping In my over night test the workaround triggered 31 times. The test has found no problems. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature