RE: PROBLEM: tcan4x5x nINT stays asserted under high RX/TX interrupt load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Marc,

I tested this on a (vendor specific) 5.4.24 kernel, where I know the patch is valid.
I won't be able to test it on the latest main-line kernel on short term, due to board bringup issues with this kernel base/revision change.
However, the patch itself is quite trivial. What do you advise? Do you prefer a tested patch for 5.4.24, an untested patch for 5.18, or otherwise?

Met vriendelijke groet / Kind regards,

Wouter van Herpen 

-----Original Message-----
From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> 
Sent: zondag 3 april 2022 12:58
To: Wouter van Herpen <wouter.van.herpen@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cc: linux-can@xxxxxxxxxxxxxxx
Subject: Re: PROBLEM: tcan4x5x nINT stays asserted under high RX/TX interrupt load

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




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux