mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Chandrasekar Ramakrishnan" <rcsekar@samsung.com>,
	"Vincent Mailhol" <mailhol.vincent@wanadoo.fr>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Martin Hundebøll" <martin@geanix.com>,
	"Markus Schneider-Pargmann" <msp@baylibre.com>,
	"Felipe Balbi (Intel)" <balbi@kernel.org>,
	"Raymond Tan" <raymond.tan@intel.com>,
	"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux@ew.tq-group.com,
	lst@pengutronix.de
Subject: Re: [PATCH v2 2/2] can: m_can: fix missed interrupts with m_can_pci
Date: Mon, 23 Sep 2024 13:06:40 +0200	[thread overview]
Message-ID: <28314c36f464e1d39f71c0a60997c38fd6775172.camel@ew.tq-group.com> (raw)
In-Reply-To: <20240923-honored-ant-of-ecstasy-f7edae-mkl@pengutronix.de>

On Mon, 2024-09-23 at 12:17 +0200, Marc Kleine-Budde wrote:
> On 19.09.2024 13:27:28, Matthias Schiffer wrote:
> > The interrupt line of PCI devices is interpreted as edge-triggered,
> > however the interrupt signal of the m_can controller integrated in Intel
> > Elkhart Lake CPUs appears to be generated level-triggered.
> > 
> > Consider the following sequence of events:
> > 
> > - IR register is read, interrupt X is set
> > - A new interrupt Y is triggered in the m_can controller
> > - IR register is written to acknowledge interrupt X. Y remains set in IR
> > 
> > As at no point in this sequence no interrupt flag is set in IR, the
> > m_can interrupt line will never become deasserted, and no edge will ever
> > be observed to trigger another run of the ISR. This was observed to
> > result in the TX queue of the EHL m_can to get stuck under high load,
> > because frames were queued to the hardware in m_can_start_xmit(), but
> > m_can_finish_tx() was never run to account for their successful
> > transmission.
> > 
> > To fix the issue, repeatedly read and acknowledge interrupts at the
> > start of the ISR until no interrupt flags are set, so the next incoming
> > interrupt will also result in an edge on the interrupt line.
> > 
> > Fixes: cab7ffc0324f ("can: m_can: add PCI glue driver for Intel Elkhart Lake")
> > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> 
> My coworker Lucas pointed me to:
> 
> > https://wiki.linuxfoundation.org/networking/napi#non-level_sensitive_irqs
> 

Thanks. I don't think this is directly applicable here - in our case the lost TX complete interrupts
were the issue, not (only) the RX interrupts.

Matthias


> On the other hand, I would also like to convert the !peripteral part of
> the driver to rx-offload. However, I am still looking for potential
> customers for this task. I have talked to some TI and ST people at LPC,
> maybe they are interested.
> 
> I think let's first fix edge sensitive IRQs, then rework the driver to
> rx-offload.
> 
> regards,
> Marc
> 
>  

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/

  reply	other threads:[~2024-09-23 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19 11:27 [PATCH v2 1/2] can: m_can: set init flag earlier in probe Matthias Schiffer
2024-09-19 11:27 ` [PATCH v2 2/2] can: m_can: fix missed interrupts with m_can_pci Matthias Schiffer
2024-09-23  8:03   ` Markus Schneider-Pargmann
2024-09-23  9:32     ` Matthias Schiffer
2024-09-23 10:07       ` Markus Schneider-Pargmann
2024-09-23 10:53         ` Marc Kleine-Budde
2024-09-23 10:30     ` Marc Kleine-Budde
2024-09-24  6:16       ` [PATCH DO_NOT_APPLY] net: can: m_can: Support tcan level with edge interrupts Markus Schneider-Pargmann
2024-09-23 10:17   ` [PATCH v2 2/2] can: m_can: fix missed interrupts with m_can_pci Marc Kleine-Budde
2024-09-23 11:06     ` Matthias Schiffer [this message]
2024-09-23  8:12 ` [PATCH v2 1/2] can: m_can: set init flag earlier in probe Markus Schneider-Pargmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28314c36f464e1d39f71c0a60997c38fd6775172.camel@ew.tq-group.com \
    --to=matthias.schiffer@ew.tq-group.com \
    --cc=balbi@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@ew.tq-group.com \
    --cc=lst@pengutronix.de \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=martin@geanix.com \
    --cc=mkl@pengutronix.de \
    --cc=msp@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raymond.tan@intel.com \
    --cc=rcsekar@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®