mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Machon <daniel.machon@microchip.com>
To: <colton.pawielski@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Daniel Palmer <daniel@0x0f.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Karl Mehltretter <kmehltretter@gmail.com>
Subject: Re: [PATCH net v2] net: 8139cp: keep Rx masked while NAPI is scheduled
Date: Mon, 2 Nov 2026 12:28:46 +0100	[thread overview]
Message-ID: <20261102112846.j64carcljhtmqv3v@DEN-DL-M70577> (raw)
In-Reply-To: <20261031-b4-8139cp-napi-v2-1-5824797c0fe6@gmail.com>

> From: Colton Pawielski <colton.pawielski@gmail.com>
> 
> cp_rx_poll() calls napi_complete_done() and only then takes cp->lock
> with interrupts disabled to unmask the Rx interrupts. An interrupt
> that is not masked while polling (TxOK, TxErr, ...) can arrive in
> between. cp_interrupt() then sees the Rx status bits, which are still
> set, finds NAPI no longer scheduled, masks Rx and schedules NAPI again.
> cp_rx_poll() then carries on and unmasks Rx anyway.
> 
> From that point Rx interrupts are enabled while NAPI is scheduled:
> cp_interrupt() leaves the Rx bits for the poll routine, does not mask
> them because napi_schedule_prep() fails, and the level-triggered
> interrupt fires again as soon as it returns. On an SH7751 LANDISK
> under combined Tx/Rx load this interrupt storm was captured with a RAM
> trace right before the board locked up hard.
> 
> Mask Rx in cp_interrupt() whenever Rx status is pending, not only when
> NAPI gets scheduled. If the race leaves Rx unmasked, the next interrupt
> masks it again, and the pending poll unmasks it when it completes.
> 
> Fixes: ab1e7e1d2666 ("8139cp: use napi_complete_done()")
> Signed-off-by: Colton Pawielski <colton.pawielski@gmail.com>

Reviewed-by: Daniel Machon <daniel.machon@microchip.com>

  reply	other threads:[~2026-11-02 11:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 16:47 Colton Pawielski via B4 Relay
2026-11-02 11:28 ` Daniel Machon [this message]
2026-11-05 10:20 ` patchwork-bot+netdevbpf

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=20261102112846.j64carcljhtmqv3v@DEN-DL-M70577 \
    --to=daniel.machon@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=colton.pawielski@gmail.com \
    --cc=daniel@0x0f.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=kmehltretter@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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®