]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
net: ethernet: arc: emac: quiesce interrupts before requesting IRQ
authorFan Wu <fanwu01@zju.edu.cn>
Mon, 9 Mar 2026 13:24:09 +0000 (13:24 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2026 02:05:12 +0000 (19:05 -0700)
commit2503d08f8a2de618e5c3a8183b250ff4a2e2d52c
treee3c1f3cce6350e85c1aef166888fd5e1cb2bdbfc
parent28b225282d44e2ef40e7f46cfdbd5d1b20b8874f
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: e4f2379db6c6 ("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>
drivers/net/ethernet/arc/emac_main.c