]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 11 May 2022 03:17:51 +0000 (20:17 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 12 May 2022 07:58:58 +0000 (09:58 +0200)
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: 7898495dd5a3 ("bcmgenet: add WOL IRQ check")
Fixes: bf21da15a221 ("net: bcmgenet: Avoid touching non-existent interrupt")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/20220511031752.2245566-1-f.fainelli@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index bf1ec8fdc2adc0a62e06393c41bca7e1afa70c54..e87e46c47387ed5235a84cc2451631fb76ab398f 100644 (file)
@@ -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)) {