mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
net: ethernet: mtk_eth_soc: only use legacy mode on missing IRQ name
If platform_get_irq_byname returns -ENXIO fall back to legacy (index based) mode, but on other errors function should return this error. Suggested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250619132125.78368-5-linux@fw-web.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
9c0feca0a6
commit
070e98dd4e
|
|
@ -3346,6 +3346,13 @@ static int mtk_get_irqs(struct platform_device *pdev, struct mtk_eth *eth)
|
|||
if (eth->irq[MTK_FE_IRQ_TX] >= 0 && eth->irq[MTK_FE_IRQ_RX] >= 0)
|
||||
return 0;
|
||||
|
||||
/* only use legacy mode if platform_get_irq_byname returned -ENXIO */
|
||||
if (eth->irq[MTK_FE_IRQ_TX] != -ENXIO)
|
||||
return eth->irq[MTK_FE_IRQ_TX];
|
||||
|
||||
if (eth->irq[MTK_FE_IRQ_RX] != -ENXIO)
|
||||
return eth->irq[MTK_FE_IRQ_RX];
|
||||
|
||||
/* legacy way:
|
||||
* On MTK_SHARED_INT SoCs (MT7621 + MT7628) the first IRQ is taken
|
||||
* from devicetree and used for both RX and TX - it is shared.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user