Re: [PATCH net v9 08/10] can: rockchip_canfd: serialize TX with bus-off and restart
From: Cunhao Lu
Date: Fri Nov 13 2026 - 00:40:06 EST
Hi,
> [Severity: Medium]
> Is irq_suspended working as a lock here?
The flag is an IRQ entry gate used with device interrupt masking and
synchronize_irq(). During restart, the driver masks and flushes device
interrupts, sets the flag, then drains handlers before reinitialization.
In this tree, the IRQ descriptor lock used by synchronization and
dispatch orders the flag store against later handler entry. The
release-clear publishes the initialized state to the handler's
acquire-load.
Open sets the gate before request_irq(), when no previous handler is
registered, so there is no old handler to drain there. TX and timecounter
state have their own locks. The BEC getter is outside this IRQ protocol;
its cache synchronization issue predates the patch. I have not found a
concrete new race in this sequence that warrants replacing the gate with
another lock.
> [Severity: Low]
> Is the CAN core known to be out of reset when this INT_MASK write
> arrives?
> ...
> Should there be a short settle delay after deassertion, or a check of the
> read-back value?
On RK3588 rev2.2, I tested 300 reset samples per controller, 600 in total,
covering open, close and direct restart callbacks while idle. The tests
preserved the production order: deassert, write 0x7fff, then first
readback, with no extra MMIO, logging or delay before that write. Every
first readback was 0x3fff; bit 14 consistently read as zero and was not
mistaken for a lost write.
These tests found no lost first mask write or evidence that this change
introduces or worsens the suspected problem.
Best regards,
Cunhao Lu