ath79: ag71xx: Disable napi related interrupts during probe
[openwrt/openwrt.git] / target / linux / ath79 / files / drivers / net / ethernet / atheros / ag71xx / ag71xx_main.c
index 607cc0b93440b5ecbb8a54884f191f9c0f286bc6..a38b336a8d8037f3d6faf9d3b4a9ed77005dd223 100644 (file)
@@ -1600,6 +1600,12 @@ static int ag71xx_probe(struct platform_device *pdev)
                        return -ENOMEM;
        }
 
+       /* ensure that HW is in manual polling mode before interrupts are
+        * activated. Otherwise ag71xx_interrupt might call napi_schedule
+        * before it is initialized by netif_napi_add.
+        */
+       ag71xx_int_disable(ag, AG71XX_INT_POLL);
+
        dev->irq = platform_get_irq(pdev, 0);
        err = devm_request_irq(&pdev->dev, dev->irq, ag71xx_interrupt,
                               0x0, dev_name(&pdev->dev), dev);