Skip to content

Commit 43ff0d7

Browse files
imtangmengkuba-moo
authored andcommitted
bcm63xx_enet: Use platform_get_irq() to get the interrupt
platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Meng Tang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 61fd7ac commit 43ff0d7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/net/ethernet/broadcom/bcm63xx_enet.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,17 +1716,17 @@ static int bcm_enet_probe(struct platform_device *pdev)
17161716
struct bcm_enet_priv *priv;
17171717
struct net_device *dev;
17181718
struct bcm63xx_enet_platform_data *pd;
1719-
struct resource *res_irq, *res_irq_rx, *res_irq_tx;
1719+
int irq, irq_rx, irq_tx;
17201720
struct mii_bus *bus;
17211721
int i, ret;
17221722

17231723
if (!bcm_enet_shared_base[0])
17241724
return -EPROBE_DEFER;
17251725

1726-
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
1727-
res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
1728-
res_irq_tx = platform_get_resource(pdev, IORESOURCE_IRQ, 2);
1729-
if (!res_irq || !res_irq_rx || !res_irq_tx)
1726+
irq = platform_get_irq(pdev, 0);
1727+
irq_rx = platform_get_irq(pdev, 1);
1728+
irq_tx = platform_get_irq(pdev, 2);
1729+
if (irq < 0 || irq_rx < 0 || irq_tx < 0)
17301730
return -ENODEV;
17311731

17321732
dev = alloc_etherdev(sizeof(*priv));
@@ -1748,9 +1748,9 @@ static int bcm_enet_probe(struct platform_device *pdev)
17481748
goto out;
17491749
}
17501750

1751-
dev->irq = priv->irq = res_irq->start;
1752-
priv->irq_rx = res_irq_rx->start;
1753-
priv->irq_tx = res_irq_tx->start;
1751+
dev->irq = priv->irq = irq;
1752+
priv->irq_rx = irq_rx;
1753+
priv->irq_tx = irq_tx;
17541754

17551755
priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
17561756
if (IS_ERR(priv->mac_clk)) {

0 commit comments

Comments
 (0)