Hello Wouter, On 01.04.2022 13:23:43, Wouter van Herpen wrote: > When using the tcan4x5x under high load of both RX/TX interrupts, at > some point the nINT signal stays asserted, causing the socket to block > in user space. > > This reproduces very reliably (in my system) when both reading/writing > at 1ms intervals at CAN bus speed 1Mbps. When it occurs, M_CAN_IR is > set to 0x580d and never recovers (causing nINT to stay asserted). The > problem does not occur when only reading or only writing. > > After checking the m_can_isr() function from > drivers/net/can/m_can/m_can.c, I noticed that MCAN interrupts are > disabled while processing the IR_RF0N flag, but not while processing > IR_TEFN. I'm not sure why, aren't both handlers running from the same > interrupt context and communicating to MRAM via SPI? Thanks for your analysis. Without looking deeper into it, that sounds reasonable. > I'm running kernel version 5.4.24 but I can see that in e.g. 5.17.0 > this still applies. When I disable interrupts during IR_TEFN handling, > the blocking socket / nINT issue is gone. Can you send a patch fixing the problem? Please include a patch description and your Signed-off-by: https://elixir.bootlin.com/linux/v5.12/source/Documentation/process/submitting-patches.rst#L356 regards, Marc
Attachment:
signature.asc
Description: PGP signature