stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Pavel Machek <pavel@denx.de>, Sasha Levin <sashal@kernel.org>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <chris.paterson2@renesas.com>,
	linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
Date: Wed, 2 Nov 2022 02:36:43 +0100	[thread overview]
Message-ID: <Y2HJq/MLElPiN+Hb@kroah.com> (raw)
In-Reply-To: <20221031090420.589386-1-biju.das.jz@bp.renesas.com>

On Mon, Oct 31, 2022 at 09:04:20AM +0000, Biju Das wrote:
> commit 702de2c21eed04c67cefaaedc248ef16e5f6b293 upstream.
> 
> We are seeing an IRQ storm on the global receive IRQ line under heavy
> CAN bus load conditions with both CAN channels enabled.
> 
> Conditions:
> 
> The global receive IRQ line is shared between can0 and can1, either of
> the channels can trigger interrupt while the other channel's IRQ line
> is disabled (RFIE).
> 
> When global a receive IRQ interrupt occurs, we mask the interrupt in
> the IRQ handler. Clearing and unmasking of the interrupt is happening
> in rx_poll(). There is a race condition where rx_poll() unmasks the
> interrupt, but the next IRQ handler does not mask the IRQ due to
> NAPIF_STATE_MISSED flag (e.g.: can0 RX FIFO interrupt is disabled and
> can1 is triggering RX interrupt, the delay in rx_poll() processing
> results in setting NAPIF_STATE_MISSED flag) leading to an IRQ storm.
> 
> This patch fixes the issue by checking IRQ active and enabled before
> handling the IRQ on a particular channel.
> 
> Fixes: dd3bd23eb438 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
> Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Link: https://lore.kernel.org/all/20221025155657.1426948-2-biju.das.jz@bp.renesas.com
> Cc: stable@vger.kernel.org # 4.9.x
> [mkl: adjust commit message]
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> [biju: removed gpriv from RCANFD_RFCC_RFIE macro]
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> Resending to 4.9 with confilcts[1] fixed
> [1] https://lore.kernel.org/stable/OS0PR01MB59226F2443DFCE7C5D73778786379@OS0PR01MB5922.jpnprd01.prod.outlook.com/T/#t
> ---
>  drivers/net/can/rcar/rcar_canfd.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

All now queued up, thanks.

greg k-h

  reply	other threads:[~2022-11-02  1:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  9:04 [PATCH] can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive Biju Das
2022-11-02  1:36 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-31 14:33 Biju Das
2022-11-01  7:43 ` Pavel Machek
2022-11-01  7:59   ` Biju Das
2022-11-01 12:36     ` Bagas Sanjaya
2022-11-01 13:32       ` gregkh
2022-10-31 13:26 Biju Das
2022-10-31 12:50 Biju Das
2022-10-31 11:50 Biju Das
2022-10-31  9:35 Biju Das
2022-10-31  9:02 Biju Das

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=Y2HJq/MLElPiN+Hb@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=chris.paterson2@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@denx.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).