Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Zhang <patrzhan@amazon.com>
To: <netdev-bot+sashiko@kernel.org>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	Vincent Mailhol <mailhol@kernel.org>, <linux-can@vger.kernel.org>,
	Pavel Pisa <pisa@cmp.felk.cvut.cz>,
	Ondrej Ille <ondrej.ille@gmail.com>, Harini T <harini.t@amd.com>,
	Michal Simek <michal.simek@amd.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>
Subject: Re: [PATCH 3/3] can: ifi_canfd: enable NAPI before starting the controller
Date: Mon, 26 Oct 2026 20:58:55 +0000	[thread overview]
Message-ID: <20261026205855.871681-1-patrzhan@amazon.com> (raw)
In-Reply-To: <179274950592.3130.11275892525697074934@kernel.org>

On Fri, 23 Oct 2026 09:58, netdev-bot+sashiko wrote:
> With NAPI enabled before ifi_canfd_start(), can ifi_canfd_poll() now run
> against an IP that has not been reset yet? Can it also run alongside the
> reset and programming sequence in ifi_canfd_start()?

I think this is a valid point. Unlike ctucanfd and xilinx_can, which reset
the controller in open() before napi_enable(), ifi_canfd_open() does not
quiesce the IP first, the handler is registered with IRQF_SHARED, and the
ISR acts on the raw IFI_CANFD_INTERRUPT status. So on the first open after
boot or kexec, the poll can now be scheduled before or during
ifi_canfd_start().

In v2 I plan to call ifi_canfd_stop() in ifi_canfd_open() before
request_irq(), so the IP is reset, its interrupts are masked and pending
status is cleared before the handler is installed and NAPI is enabled.

The bus-off restart path through ifi_canfd_set_mode() already runs with
NAPI enabled. I will leave that alone in this series.

I will wait a few days for other comments on the series before sending v2.

pw-bot: cr


      reply	other threads:[~2026-10-26 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 20:59 [PATCH 0/3] can: enable NAPI before starting the controller in three drivers Patrick Zhang
2026-10-21 20:59 ` [PATCH 1/3] can: ctucanfd: enable NAPI before starting the controller Patrick Zhang
2026-10-22 12:59   ` Pavel Pisa
2026-10-21 20:59 ` [PATCH 2/3] can: xilinx_can: " Patrick Zhang
2026-10-21 20:59 ` [PATCH 3/3] can: ifi_canfd: " Patrick Zhang
2026-10-23  9:58   ` netdev-bot+sashiko
2026-10-26 20:58     ` Patrick Zhang [this message]

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=20261026205855.871681-1-patrzhan@amazon.com \
    --to=patrzhan@amazon.com \
    --cc=harini.t@amd.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=ondrej.ille@gmail.com \
    --cc=pisa@cmp.felk.cvut.cz \
    /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