Lines Matching refs:netdev

263 	struct net_device *netdev;  in xgbe_probe()  local
272 netdev = alloc_etherdev_mq(sizeof(struct xgbe_prv_data), in xgbe_probe()
274 if (!netdev) { in xgbe_probe()
279 SET_NETDEV_DEV(netdev, dev); in xgbe_probe()
280 pdata = netdev_priv(netdev); in xgbe_probe()
281 pdata->netdev = netdev; in xgbe_probe()
285 platform_set_drvdata(pdev, netdev); in xgbe_probe()
385 netdev->irq = pdata->dev_irq; in xgbe_probe()
386 netdev->base_addr = (unsigned long)pdata->xgmac_regs; in xgbe_probe()
387 memcpy(netdev->dev_addr, pdata->mac_addr, netdev->addr_len); in xgbe_probe()
423 ret = netif_set_real_num_tx_queues(netdev, pdata->tx_ring_count); in xgbe_probe()
433 ret = netif_set_real_num_rx_queues(netdev, pdata->rx_ring_count); in xgbe_probe()
462 netdev->netdev_ops = xgbe_get_netdev_ops(); in xgbe_probe()
463 netdev->ethtool_ops = xgbe_get_ethtool_ops(); in xgbe_probe()
465 netdev->dcbnl_ops = xgbe_get_dcbnl_ops(); in xgbe_probe()
469 netdev->hw_features = NETIF_F_SG | in xgbe_probe()
481 netdev->hw_features |= NETIF_F_RXHASH; in xgbe_probe()
483 netdev->vlan_features |= NETIF_F_SG | in xgbe_probe()
489 netdev->features |= netdev->hw_features; in xgbe_probe()
490 pdata->netdev_features = netdev->features; in xgbe_probe()
492 netdev->priv_flags |= IFF_UNICAST_FLT; in xgbe_probe()
495 netdev->watchdog_timeo = 0; in xgbe_probe()
500 netif_carrier_off(netdev); in xgbe_probe()
501 ret = register_netdev(netdev); in xgbe_probe()
511 netdev_notice(netdev, "net device enabled\n"); in xgbe_probe()
524 free_netdev(netdev); in xgbe_probe()
534 struct net_device *netdev = platform_get_drvdata(pdev); in xgbe_remove() local
535 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_remove()
543 unregister_netdev(netdev); in xgbe_remove()
549 free_netdev(netdev); in xgbe_remove()
559 struct net_device *netdev = dev_get_drvdata(dev); in xgbe_suspend() local
564 if (!netif_running(netdev)) { in xgbe_suspend()
569 ret = xgbe_powerdown(netdev, XGMAC_DRIVER_CONTEXT); in xgbe_suspend()
578 struct net_device *netdev = dev_get_drvdata(dev); in xgbe_resume() local
583 if (!netif_running(netdev)) { in xgbe_resume()
588 ret = xgbe_powerup(netdev, XGMAC_DRIVER_CONTEXT); in xgbe_resume()