On Fri, 09 Oct 2020 18:24:02 +0200, Marc Kleine-Budde wrote: > On 10/9/20 4:16 PM, Kurt Van Dijck wrote: > > I'm using a v5.4 kernel now, with backported 'can: mcp25xxfd: initial commit'. > > I did focus up to now to CAN recv performance, but now I face another > > issue. I have errors transmitting to CAN. > > What kind of errors? First observation is that no response is received for some requests. This is very high level, I need to investigate if the request is really sent. This is a needle in a haystack. Due to the transmit error counter in `ip -s link show can0`, I guess it's not sent. > > > It's unstable. > > What does that mean? Each burst of >x CAN frames produces the problem. I still figure x in this statement. I'm porting the problem to my desk to reproduce. > > > I need to collect more details, and it is now about focus number 1. > > > > I managed to decrease the urgency for my project by inserting a delay > > in the most busy transmitter. > > > > Any ideas what to look for? > > The mcp2517fd suffers from the MAB TX underflow errata: See 1. in > http://ww1.microchip.com/downloads/en/DeviceDoc/MCP2517FD-External-CAN-FD-Controller-with-SPI-Interface-20005688B.pdf > > Compile the driver with "#define DEBUG" or remove the > "MCP251XFD_QUIRK_MAB_NO_WARN" from the mcp251xfd_devtype_data_mcp2517fd. Then > you should see an error message when the chip switches modes due to the MAB > underrun. I'll do this. > > If it's that errors there's not so much you can do, maybe optimize the SPI host > driver (or use a mcp2518fd). Which SoC are you on? still the imx8mm, on a variscite board, with suboptimal 20MHz oscillator, 8.5Mhz SPI speed, 1Mbit CAN Kurt