Lines Matching refs:ndev
2818 struct net_device *ndev = NULL; in stmmac_dvr_probe() local
2821 ndev = alloc_etherdev(sizeof(struct stmmac_priv)); in stmmac_dvr_probe()
2822 if (!ndev) in stmmac_dvr_probe()
2825 SET_NETDEV_DEV(ndev, device); in stmmac_dvr_probe()
2827 priv = netdev_priv(ndev); in stmmac_dvr_probe()
2829 priv->dev = ndev; in stmmac_dvr_probe()
2831 stmmac_set_ethtool_ops(ndev); in stmmac_dvr_probe()
2890 ndev->netdev_ops = &stmmac_netdev_ops; in stmmac_dvr_probe()
2892 ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | in stmmac_dvr_probe()
2894 ndev->features |= ndev->hw_features | NETIF_F_HIGHDMA; in stmmac_dvr_probe()
2895 ndev->watchdog_timeo = msecs_to_jiffies(watchdog); in stmmac_dvr_probe()
2898 ndev->features |= NETIF_F_HW_VLAN_CTAG_RX; in stmmac_dvr_probe()
2915 netif_napi_add(ndev, &priv->napi, stmmac_poll, 64); in stmmac_dvr_probe()
2920 ret = register_netdev(ndev); in stmmac_dvr_probe()
2942 ret = stmmac_mdio_register(ndev); in stmmac_dvr_probe()
2953 unregister_netdev(ndev); in stmmac_dvr_probe()
2961 free_netdev(ndev); in stmmac_dvr_probe()
2973 int stmmac_dvr_remove(struct net_device *ndev) in stmmac_dvr_remove() argument
2975 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_dvr_remove()
2983 netif_carrier_off(ndev); in stmmac_dvr_remove()
2984 unregister_netdev(ndev); in stmmac_dvr_remove()
2991 stmmac_mdio_unregister(ndev); in stmmac_dvr_remove()
2992 free_netdev(ndev); in stmmac_dvr_remove()
3005 int stmmac_suspend(struct net_device *ndev) in stmmac_suspend() argument
3007 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_suspend()
3010 if (!ndev || !netif_running(ndev)) in stmmac_suspend()
3018 netif_device_detach(ndev); in stmmac_suspend()
3019 netif_stop_queue(ndev); in stmmac_suspend()
3055 int stmmac_resume(struct net_device *ndev) in stmmac_resume() argument
3057 struct stmmac_priv *priv = netdev_priv(ndev); in stmmac_resume()
3060 if (!netif_running(ndev)) in stmmac_resume()
3084 netif_device_attach(ndev); in stmmac_resume()
3086 init_dma_desc_rings(ndev, GFP_ATOMIC); in stmmac_resume()
3087 stmmac_hw_setup(ndev, false); in stmmac_resume()
3092 netif_start_queue(ndev); in stmmac_resume()