Skip to contentSkip to conversation

net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral

PATCH Applied Florian Fainelli 3 participants 3 messages May 11, 2022 – May 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral

The interrupt controller supplying the Wake-on-LAN interrupt line maybe modular on some platforms (irq-bcm7038-l1.c) and might be probed at a later time than the GENET driver. We need to specifically check for -EPROBE_DEFER and propagate that error to ensure that we eventually fetch the interrupt descriptor.

Fixes 9deb48b53e7f ("bcmgenet: add WOL IRQ check")
Fixes 5b1f0e62941b ("net: bcmgenet: Avoid touching non-existent interrupt")
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +4 -0
index bf1ec8fdc2ad..e87e46c47387 100644
@@ -3999,6 +3999,10 @@ static int bcmgenet_probe(struct platform_device *pdev)
 		goto err;
 	}
 	priv->wol_irq = platform_get_irq_optional(pdev, 2);
+	if (priv->wol_irq == -EPROBE_DEFER) {
+		err = priv->wol_irq;
+		goto err;
+	}
 
 	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

Am 11.05.22 um 05:17 schrieb Florian Fainelli:

Quoted 9 lines

The interrupt controller supplying the Wake-on-LAN interrupt line maybe modular on some platforms (irq-bcm7038-l1.c) and might be probed at a later time than the GENET driver. We need to specifically check for -EPROBE_DEFER and propagate that error to ensure that we eventually fetch the interrupt descriptor.

Fixes 9deb48b53e7f ("bcmgenet: add WOL IRQ check")
Fixes 5b1f0e62941b ("net: bcmgenet: Avoid touching non-existent interrupt")
Quoted 19 lines
---
  drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +4 -0
index bf1ec8fdc2ad..e87e46c47387 100644
@@ -3999,6 +3999,10 @@ static int bcmgenet_probe(struct platform_device *pdev)
  		goto err;
  	}
  	priv->wol_irq = platform_get_irq_optional(pdev, 2);
+	if (priv->wol_irq == -EPROBE_DEFER) {
+		err = priv->wol_irq;
+		goto err;
+	}
 
  	priv->base = devm_platform_ioremap_resource(pdev, 0);
  	if (IS_ERR(priv->base)) {
#2 lore raw
In reply to Florian Fainelli
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Tue, 10 May 2022 20:17:51 -0700 you wrote:

The interrupt controller supplying the Wake-on-LAN interrupt line maybe modular on some platforms (irq-bcm7038-l1.c) and might be probed at a later time than the GENET driver. We need to specifically check for -EPROBE_DEFER and propagate that error to ensure that we eventually fetch the interrupt descriptor.

Fixes 9deb48b53e7f ("bcmgenet: add WOL IRQ check")
Fixes 5b1f0e62941b ("net: bcmgenet: Avoid touching non-existent interrupt")

[...]

Here is the summary with links:
- [net] net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral

    https://git.kernel.org/netdev/net/c/6b77c06655b8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html