linux/drivers/net/ethernet/arc
Fan Wu 2503d08f8a net: ethernet: arc: emac: quiesce interrupts before requesting IRQ
Normal RX/TX interrupts are enabled later, in arc_emac_open(), so probe
should not see interrupt delivery in the usual case. However, hardware may
still present stale or latched interrupt status left by firmware or the
bootloader.

If probe later unwinds after devm_request_irq() has installed the handler,
such a stale interrupt can still reach arc_emac_intr() during teardown and
race with release of the associated net_device.

Avoid that window by putting the device into a known quiescent state before
requesting the IRQ: disable all EMAC interrupt sources and clear any
pending EMAC interrupt status bits. This keeps the change hardware-focused
and minimal, while preventing spurious IRQ delivery from leftover state.

Fixes: e4f2379db6 ("ethernet/arc/arc_emac - Add new driver")
Cc: stable@vger.kernel.org
Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
Link: https://patch.msgid.link/20260309132409.584966-1-fanwu01@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-10 19:05:12 -07:00
..
Kconfig net: ethernet: arc: remove emac_arc driver 2024-06-21 10:07:17 +01:00
Makefile net: ethernet: arc: remove emac_arc driver 2024-06-21 10:07:17 +01:00
emac.h net: arc: Make arc_emac_remove() return void 2023-05-19 13:33:28 +01:00
emac_main.c net: ethernet: arc: emac: quiesce interrupts before requesting IRQ 2026-03-10 19:05:12 -07:00
emac_mdio.c net: arc: rockchip: fix emac mdio node support 2024-11-07 13:39:42 +01:00
emac_rockchip.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00