Lines Matching refs:netdev
339 struct net_device *netdev; in xgbe_probe() local
350 netdev = alloc_etherdev_mq(sizeof(struct xgbe_prv_data), in xgbe_probe()
352 if (!netdev) { in xgbe_probe()
357 SET_NETDEV_DEV(netdev, dev); in xgbe_probe()
358 pdata = netdev_priv(netdev); in xgbe_probe()
359 pdata->netdev = netdev; in xgbe_probe()
363 platform_set_drvdata(pdev, netdev); in xgbe_probe()
645 netdev->irq = pdata->dev_irq; in xgbe_probe()
646 netdev->base_addr = (unsigned long)pdata->xgmac_regs; in xgbe_probe()
647 memcpy(netdev->dev_addr, pdata->mac_addr, netdev->addr_len); in xgbe_probe()
679 ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); in xgbe_probe()
689 ret = netif_set_real_num_rx_queues(netdev, pdata->rx_ring_count); in xgbe_probe()
710 netdev->netdev_ops = xgbe_get_netdev_ops(); in xgbe_probe()
711 netdev->ethtool_ops = xgbe_get_ethtool_ops(); in xgbe_probe()
713 netdev->dcbnl_ops = xgbe_get_dcbnl_ops(); in xgbe_probe()
717 netdev->hw_features = NETIF_F_SG | in xgbe_probe()
729 netdev->hw_features |= NETIF_F_RXHASH; in xgbe_probe()
731 netdev->vlan_features |= NETIF_F_SG | in xgbe_probe()
737 netdev->features |= netdev->hw_features; in xgbe_probe()
738 pdata->netdev_features = netdev->features; in xgbe_probe()
740 netdev->priv_flags |= IFF_UNICAST_FLT; in xgbe_probe()
743 netdev->watchdog_timeo = 0; in xgbe_probe()
748 netif_carrier_off(netdev); in xgbe_probe()
749 ret = register_netdev(netdev); in xgbe_probe()
757 netdev_name(netdev)); in xgbe_probe()
761 create_singlethread_workqueue(netdev_name(netdev)); in xgbe_probe()
763 netdev_err(netdev, "device workqueue creation failed\n"); in xgbe_probe()
771 netdev_err(netdev, "phy workqueue creation failed\n"); in xgbe_probe()
782 netdev_notice(netdev, "net device enabled\n"); in xgbe_probe()
792 unregister_netdev(netdev); in xgbe_probe()
798 free_netdev(netdev); in xgbe_probe()
808 struct net_device *netdev = platform_get_drvdata(pdev); in xgbe_remove() local
809 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_remove()
823 unregister_netdev(netdev); in xgbe_remove()
825 free_netdev(netdev); in xgbe_remove()
835 struct net_device *netdev = dev_get_drvdata(dev); in xgbe_suspend() local
836 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_suspend()
841 if (netif_running(netdev)) in xgbe_suspend()
842 ret = xgbe_powerdown(netdev, XGMAC_DRIVER_CONTEXT); in xgbe_suspend()
855 struct net_device *netdev = dev_get_drvdata(dev); in xgbe_resume() local
856 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_resume()
864 if (netif_running(netdev)) in xgbe_resume()
865 ret = xgbe_powerup(netdev, XGMAC_DRIVER_CONTEXT); in xgbe_resume()