]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: ethernet: mtk_eth_soc: pass eth to mtk_handle_irq_rx in poll_controller
authorChenguang Zhao <zhaochenguang@kylinos.cn>
Thu, 23 Jul 2026 05:57:35 +0000 (13:57 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jul 2026 13:53:49 +0000 (15:53 +0200)
mtk_handle_irq_rx expects a struct mtk_eth * (matching the request_irq
cookie), but mtk_poll_controller incorrectly passed the net_device *.
Calling ndo_poll_controller with CONFIG_NET_POLL_CONTROLLER enabled
would then crash.

Fixes: 8186f6e382d8 ("net-next: mediatek: fix compile error inside mtk_poll_controller()")
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
Link: https://patch.msgid.link/20260723055735.885112-1-chenguang.zhao@linux.dev
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index 5d291e50a47bb9d36013cf5d43124b1f718590fb..351444fb48716171c7d4c36938fe8a5d09812f71 100644 (file)
@@ -3467,7 +3467,7 @@ static void mtk_poll_controller(struct net_device *dev)
 
        mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
        mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask);
-       mtk_handle_irq_rx(eth->irq[MTK_FE_IRQ_RX], dev);
+       mtk_handle_irq_rx(eth->irq[MTK_FE_IRQ_RX], eth);
        mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
        mtk_rx_irq_enable(eth, eth->soc->rx.irq_done_mask);
 }