[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221024153726.72avg6xbgzwyboms@pengutronix.de>
Date: Mon, 24 Oct 2022 17:37:26 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Biju Das <biju.das.jz@...renesas.com>
Cc: Wolfgang Grandegger <wg@...ndegger.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Stefan Mätje <stefan.maetje@....eu>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
Ulrich Hecht <uli+renesas@...nd.eu>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Rob Herring <robh@...nel.org>, linux-can@...r.kernel.org,
netdev@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>,
Chris Paterson <Chris.Paterson2@...esas.com>,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 1/3] can: rcar_canfd: Fix IRQ storm on global fifo receive
On 22.10.2022 09:15:01, Biju Das wrote:
> We are seeing IRQ storm on global receive IRQ line under heavy CAN
> bus load conditions with both CAN channels are enabled.
>
> Conditions:
> The global receive IRQ line is shared between can0 and can1, either
> of the channels can trigger interrupt while the other channel irq
> line is disabled(rfie).
> When global receive IRQ interrupt occurs, we mask the interrupt in
> irqhandler. Clearing and unmasking of the interrupt is happening in
> rx_poll(). There is a race condition where rx_poll unmask the
> interrupt, but the next irq handler does not mask the irq due to
> NAPIF_STATE_MISSED flag.
Why does this happen? Is it a problem that you call
rcar_canfd_handle_global_receive() for a channel that has the IRQs
actually disabled in hardware?
> (for eg: can0 rx fifo interrupt enable is
> disabled and can1 is triggering rx interrupt, the delay in rx_poll()
> processing results in setting NAPIF_STATE_MISSED flag) leading to IRQ
> storm.
>
> This patch fixes the issue by checking irq is masked or not in
> irq handler and it masks the interrupt if it is unmasked.
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 |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists