Re: [PATCH 3/3] can: ifi_canfd: enable NAPI before starting the controller

From: Patrick Zhang

Date: Mon Oct 26 2026 - 17:01:00 EST


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