if (err)
goto err_hw;
+ /* Initialize NAPI */
+ netif_napi_add(netdev, &priv->napi, ftgmac100_poll, 64);
+
ftgmac100_init_hw(priv);
ftgmac100_start_hw(priv);
err_ncsi:
napi_disable(&priv->napi);
netif_stop_queue(netdev);
+ netif_napi_del(&priv->napi);
iowrite32(0, priv->base + FTGMAC100_OFFSET_IER);
err_hw:
free_irq(netdev->irq, netdev);
netif_stop_queue(netdev);
napi_disable(&priv->napi);
+ netif_napi_del(&priv->napi);
if (netdev->phydev)
phy_stop(netdev->phydev);
else if (priv->use_ncsi)
spin_lock_init(&priv->tx_lock);
- /* initialize NAPI */
- netif_napi_add(netdev, &priv->napi, ftgmac100_poll, 64);
-
/* map io memory */
priv->res = request_mem_region(res->start, resource_size(res),
dev_name(&pdev->dev));